blob: bb976e3bf812b65835689ee5f2c07bb7cc389c1a [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001/* mbyte.c */
Bram Moolenaaref269542016-01-19 13:22:12 +01002int enc_canon_props(char_u *name);
Bram Moolenaarf9e3e092019-01-13 23:38:42 +01003char *mb_init(void);
Bram Moolenaaref269542016-01-19 13:22:12 +01004int bomb_size(void);
5void remove_bom(char_u *s);
6int mb_get_class(char_u *p);
7int mb_get_class_buf(char_u *p, buf_T *buf);
8int dbcs_class(unsigned lead, unsigned trail);
9int latin_char2len(int c);
10int latin_char2bytes(int c, char_u *buf);
11int latin_ptr2len(char_u *p);
12int latin_ptr2len_len(char_u *p, int size);
Bram Moolenaarb47a2592017-08-30 13:22:28 +020013int utf_uint2cells(UINT32_T c);
Bram Moolenaaref269542016-01-19 13:22:12 +010014int utf_char2cells(int c);
15int latin_ptr2cells(char_u *p);
16int utf_ptr2cells(char_u *p);
17int dbcs_ptr2cells(char_u *p);
18int latin_ptr2cells_len(char_u *p, int size);
19int latin_char2cells(int c);
20int mb_string2cells(char_u *p, int len);
21int latin_off2cells(unsigned off, unsigned max_off);
22int dbcs_off2cells(unsigned off, unsigned max_off);
23int utf_off2cells(unsigned off, unsigned max_off);
24int latin_ptr2char(char_u *p);
25int utf_ptr2char(char_u *p);
26int mb_ptr2char_adv(char_u **pp);
27int mb_cptr2char_adv(char_u **pp);
Bram Moolenaaref269542016-01-19 13:22:12 +010028int utf_composinglike(char_u *p1, char_u *p2);
29int utfc_ptr2char(char_u *p, int *pcc);
30int utfc_ptr2char_len(char_u *p, int *pcc, int maxlen);
31int utfc_char2bytes(int off, char_u *buf);
32int utf_ptr2len(char_u *p);
33int utf_byte2len(int b);
34int utf_ptr2len_len(char_u *p, int size);
35int utfc_ptr2len(char_u *p);
36int utfc_ptr2len_len(char_u *p, int size);
37int utf_char2len(int c);
38int utf_char2bytes(int c, char_u *buf);
Bram Moolenaarb47a2592017-08-30 13:22:28 +020039int utf_iscomposing_uint(UINT32_T c);
Bram Moolenaaref269542016-01-19 13:22:12 +010040int utf_iscomposing(int c);
41int utf_printable(int c);
42int utf_class(int c);
Bram Moolenaar4019cf92017-01-28 16:39:34 +010043int utf_class_buf(int c, buf_T *buf);
Bram Moolenaard90b6c02016-08-28 18:10:45 +020044int utf_ambiguous_width(int c);
Bram Moolenaaref269542016-01-19 13:22:12 +010045int utf_fold(int a);
46int utf_toupper(int a);
47int utf_islower(int a);
48int utf_tolower(int a);
49int utf_isupper(int a);
50int mb_strnicmp(char_u *s1, char_u *s2, size_t nn);
Christian Brabandt22e8e122024-07-30 20:39:18 +020051int mb_strnicmp2(char_u *s1, char_u *s2, size_t n1, size_t n2);
Bram Moolenaaref269542016-01-19 13:22:12 +010052void show_utf8(void);
53int latin_head_off(char_u *base, char_u *p);
Bram Moolenaaref269542016-01-19 13:22:12 +010054int dbcs_screen_head_off(char_u *base, char_u *p);
55int utf_head_off(char_u *base, char_u *p);
Bram Moolenaare52702f2020-06-04 18:22:13 +020056int utf_eat_space(int cc);
57int utf_allow_break_before(int cc);
58int utf_allow_break(int cc, int ncc);
Bram Moolenaaref269542016-01-19 13:22:12 +010059void mb_copy_char(char_u **fp, char_u **tp);
60int mb_off_next(char_u *base, char_u *p);
61int mb_tail_off(char_u *base, char_u *p);
62void utf_find_illegal(void);
63int utf_valid_string(char_u *s, char_u *end);
64int dbcs_screen_tail_off(char_u *base, char_u *p);
65void mb_adjust_cursor(void);
66void mb_adjustpos(buf_T *buf, pos_T *lp);
67char_u *mb_prevptr(char_u *line, char_u *p);
68int mb_charlen(char_u *str);
69int mb_charlen_len(char_u *str, int len);
70char_u *mb_unescape(char_u **pp);
71int mb_lefthalve(int row, int col);
72int mb_fix_col(int col, int row);
73char_u *enc_skip(char_u *p);
74char_u *enc_canonize(char_u *enc);
Bram Moolenaar2a027452017-09-26 19:10:37 +020075char_u *enc_locale_env(char *locale);
Bram Moolenaaref269542016-01-19 13:22:12 +010076char_u *enc_locale(void);
77int encname2codepage(char_u *name);
78void *my_iconv_open(char_u *to, char_u *from);
79int iconv_enabled(int verbose);
80void iconv_end(void);
Bram Moolenaara3a12462019-09-07 15:08:38 +020081void f_getimstatus(typval_T *argvars, typval_T *rettv);
Bram Moolenaard21e5bd2022-06-27 22:52:43 +010082void f_iconv(typval_T *argvars, typval_T *rettv);
Bram Moolenaaref269542016-01-19 13:22:12 +010083int convert_setup(vimconv_T *vcp, char_u *from, char_u *to);
84int convert_setup_ext(vimconv_T *vcp, char_u *from, int from_unicode_is_utf8, char_u *to, int to_unicode_is_utf8);
85int convert_input(char_u *ptr, int len, int maxlen);
86int convert_input_safe(char_u *ptr, int len, int maxlen, char_u **restp, int *restlenp);
87char_u *string_convert(vimconv_T *vcp, char_u *ptr, int *lenp);
88char_u *string_convert_ext(vimconv_T *vcp, char_u *ptr, int *lenp, int *unconvlenp);
mikoto2000e20fa592024-04-17 22:06:54 +020089int get_cellwidth(int c);
Bram Moolenaar08aac3c2020-08-28 21:04:24 +020090void f_setcellwidths(typval_T *argvars, typval_T *rettv);
Kota Kato66bb9ae2023-01-17 18:31:56 +000091void f_getcellwidths(typval_T *argvars, typval_T *rettv);
Bram Moolenaar4e4473c2020-08-28 22:24:57 +020092void f_charclass(typval_T *argvars, typval_T *rettv);
Yee Cheng Chin900894b2023-09-29 20:42:32 +020093char_u *get_encoding_name(expand_T *xp, int idx);
Bram Moolenaar071d4272004-06-13 20:20:40 +000094/* vim: set ft=c : */