1 Some common stuff used by other UTF-8 patches.
3 ================================================================================
4 --- mc-4.6.2-pre1/src/util.c
5 +++ mc-4.6.2-pre1/src/util.c
11 +columns_to_bytes (const char *str, int col)
17 + if (SLsmg_Is_Unicode) {
19 + while (columns < col) {
20 + memset (&s, 0, sizeof (s));
21 + i = mbrlen (str + bytes, -1, &s);
23 + return col + bytes - columns;
28 + return col + bytes - columns;
37 --- mc-4.6.2-pre1/src/util.h
38 +++ mc-4.6.2-pre1/src/util.h
41 void fix_utf8(char *str);
42 size_t mbstrlen (const char *);
43 +int columns_to_bytes (const char *, int);
44 wchar_t *mbstr_to_wchar (const char *);
45 char *wchar_to_mbstr (const wchar_t *);
46 char *utf8_to_local(char *str);