Mercurial > vim
annotate src/proto/mbyte.pro @ 24676:256fdb5f7252
Added tag v8.2.2876 for changeset ae30a87aafd3a89cf86f7f0126d36fe858a61151
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 May 2021 11:45:03 +0200 |
parents | 85add08e6a2d |
children | dc66d0284518 |
rev | line source |
---|---|
7 | 1 /* mbyte.c */ |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
2 int enc_canon_props(char_u *name); |
15470
55ccc2d353bd
patch 8.1.0743: giving error messages is not flexible
Bram Moolenaar <Bram@vim.org>
parents:
12547
diff
changeset
|
3 char *mb_init(void); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
4 int bomb_size(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
5 void remove_bom(char_u *s); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
6 int mb_get_class(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
7 int mb_get_class_buf(char_u *p, buf_T *buf); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
8 int dbcs_class(unsigned lead, unsigned trail); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
9 int latin_char2len(int c); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
10 int latin_char2bytes(int c, char_u *buf); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
11 int latin_ptr2len(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
12 int latin_ptr2len_len(char_u *p, int size); |
12269
d2373927d76d
patch 8.0.1014: old compiler doesn't know uint32_t
Christian Brabandt <cb@256bit.org>
parents:
12210
diff
changeset
|
13 int utf_uint2cells(UINT32_T c); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
14 int utf_char2cells(int c); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
15 int latin_ptr2cells(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
16 int utf_ptr2cells(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
17 int dbcs_ptr2cells(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
18 int latin_ptr2cells_len(char_u *p, int size); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
19 int latin_char2cells(int c); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
20 int mb_string2cells(char_u *p, int len); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
21 int latin_off2cells(unsigned off, unsigned max_off); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
22 int dbcs_off2cells(unsigned off, unsigned max_off); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
23 int utf_off2cells(unsigned off, unsigned max_off); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
24 int latin_ptr2char(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
25 int utf_ptr2char(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
26 int mb_ptr2char_adv(char_u **pp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
27 int mb_cptr2char_adv(char_u **pp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
28 int utf_composinglike(char_u *p1, char_u *p2); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
29 int utfc_ptr2char(char_u *p, int *pcc); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
30 int utfc_ptr2char_len(char_u *p, int *pcc, int maxlen); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
31 int utfc_char2bytes(int off, char_u *buf); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
32 int utf_ptr2len(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
33 int utf_byte2len(int b); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
34 int utf_ptr2len_len(char_u *p, int size); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
35 int utfc_ptr2len(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
36 int utfc_ptr2len_len(char_u *p, int size); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
37 int utf_char2len(int c); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
38 int utf_char2bytes(int c, char_u *buf); |
12269
d2373927d76d
patch 8.0.1014: old compiler doesn't know uint32_t
Christian Brabandt <cb@256bit.org>
parents:
12210
diff
changeset
|
39 int utf_iscomposing_uint(UINT32_T c); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
40 int utf_iscomposing(int c); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
41 int utf_printable(int c); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
42 int utf_class(int c); |
10724
ae1c6bf22e5f
patch 8.0.0252: not properly recognizing word characters between 128 and 255
Christian Brabandt <cb@256bit.org>
parents:
10025
diff
changeset
|
43 int utf_class_buf(int c, buf_T *buf); |
10025
068f397d0da4
commit https://github.com/vim/vim/commit/d90b6c02e2900576fb37d95b5e4f4a32b2d7383f
Christian Brabandt <cb@256bit.org>
parents:
8819
diff
changeset
|
44 int utf_ambiguous_width(int c); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
45 int utf_fold(int a); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
46 int utf_toupper(int a); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
47 int utf_islower(int a); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
48 int utf_tolower(int a); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
49 int utf_isupper(int a); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
50 int mb_strnicmp(char_u *s1, char_u *s2, size_t nn); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
51 void show_utf8(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
52 int latin_head_off(char_u *base, char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
53 int dbcs_screen_head_off(char_u *base, char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
54 int utf_head_off(char_u *base, char_u *p); |
20695
cea8ae407452
patch 8.2.0901: formatting CJK text isn't optimal
Bram Moolenaar <Bram@vim.org>
parents:
20637
diff
changeset
|
55 int utf_eat_space(int cc); |
cea8ae407452
patch 8.2.0901: formatting CJK text isn't optimal
Bram Moolenaar <Bram@vim.org>
parents:
20637
diff
changeset
|
56 int utf_allow_break_before(int cc); |
cea8ae407452
patch 8.2.0901: formatting CJK text isn't optimal
Bram Moolenaar <Bram@vim.org>
parents:
20637
diff
changeset
|
57 int utf_allow_break(int cc, int ncc); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
58 void mb_copy_char(char_u **fp, char_u **tp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
59 int mb_off_next(char_u *base, char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
60 int mb_tail_off(char_u *base, char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
61 void utf_find_illegal(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
62 int utf_valid_string(char_u *s, char_u *end); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
63 int dbcs_screen_tail_off(char_u *base, char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
64 void mb_adjust_cursor(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
65 void mb_adjustpos(buf_T *buf, pos_T *lp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
66 char_u *mb_prevptr(char_u *line, char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
67 int mb_charlen(char_u *str); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
68 int mb_charlen_len(char_u *str, int len); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
69 char_u *mb_unescape(char_u **pp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
70 int mb_lefthalve(int row, int col); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
71 int mb_fix_col(int col, int row); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
72 char_u *enc_skip(char_u *p); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
73 char_u *enc_canonize(char_u *enc); |
12547
aa3f6d093f4b
patch 8.0.1152: encoding of error message wrong in Cygwin terminal
Christian Brabandt <cb@256bit.org>
parents:
12269
diff
changeset
|
74 char_u *enc_locale_env(char *locale); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
75 char_u *enc_locale(void); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
76 int encname2codepage(char_u *name); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
77 void *my_iconv_open(char_u *to, char_u *from); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
78 int iconv_enabled(int verbose); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
79 void iconv_end(void); |
18008
8ae333756614
patch 8.1.2000: plugin cannot get the current IME status
Bram Moolenaar <Bram@vim.org>
parents:
16066
diff
changeset
|
80 void f_getimstatus(typval_T *argvars, typval_T *rettv); |
7668
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
81 int convert_setup(vimconv_T *vcp, char_u *from, char_u *to); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
82 int convert_setup_ext(vimconv_T *vcp, char_u *from, int from_unicode_is_utf8, char_u *to, int to_unicode_is_utf8); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
83 int convert_input(char_u *ptr, int len, int maxlen); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
84 int convert_input_safe(char_u *ptr, int len, int maxlen, char_u **restp, int *restlenp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
85 char_u *string_convert(vimconv_T *vcp, char_u *ptr, int *lenp); |
21b0a39d13ed
commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents:
4069
diff
changeset
|
86 char_u *string_convert_ext(vimconv_T *vcp, char_u *ptr, int *lenp, int *unconvlenp); |
21971
0bc43a704f56
patch 8.2.1535: it is not possible to specify cell widths of characters
Bram Moolenaar <Bram@vim.org>
parents:
20695
diff
changeset
|
87 void f_setcellwidths(typval_T *argvars, typval_T *rettv); |
21973
85add08e6a2d
patch 8.2.1536: cannot get the class of a character; emoji widths are wrong
Bram Moolenaar <Bram@vim.org>
parents:
21971
diff
changeset
|
88 void f_charclass(typval_T *argvars, typval_T *rettv); |
7 | 89 /* vim: set ft=c : */ |