1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04:00

[utf] const

This commit is contained in:
Witold Filipczyk 2022-01-31 16:28:56 +01:00
parent b982bd9abf
commit 57ebe52948
2 changed files with 5 additions and 4 deletions

View File

@ -328,9 +328,10 @@ utf8_prevchar(char *current, int pos, char *start)
/* Count number of standard terminal cells needed for displaying UTF-8
* character. */
int
utf8_char2cells(char *utf8_char, char *end)
utf8_char2cells(const char *utf8_char_const, char *end)
{
unicode_val_T u;
char *utf8_char = (char *)utf8_char_const;
if (end == NULL)
end = strchr(utf8_char, '\0');
@ -346,7 +347,7 @@ utf8_char2cells(char *utf8_char, char *end)
/* Count number of standard terminal cells needed for displaying string
* with UTF-8 characters. */
int
utf8_ptr2cells(char *string, char *end)
utf8_ptr2cells(const char *string, char *end)
{
int charlen, cell, cells = 0;

View File

@ -136,8 +136,8 @@ char *encode_utf8(unicode_val_T);
#ifdef CONFIG_UTF8
char *utf8_prevchar(char *, int, char *);
int utf8charlen(const char *);
int utf8_char2cells(char *, char *);
int utf8_ptr2cells(char *, char *);
int utf8_char2cells(const char *, char *);
int utf8_ptr2cells(const char *, char *);
int utf8_ptr2chars(char *, char *);
int utf8_cells2bytes(char *, int, char *);
/* How utf8_step_forward and utf8_step_backward count steps. */