mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[utf] const
This commit is contained in:
parent
b982bd9abf
commit
57ebe52948
@ -328,9 +328,10 @@ utf8_prevchar(char *current, int pos, char *start)
|
|||||||
/* Count number of standard terminal cells needed for displaying UTF-8
|
/* Count number of standard terminal cells needed for displaying UTF-8
|
||||||
* character. */
|
* character. */
|
||||||
int
|
int
|
||||||
utf8_char2cells(char *utf8_char, char *end)
|
utf8_char2cells(const char *utf8_char_const, char *end)
|
||||||
{
|
{
|
||||||
unicode_val_T u;
|
unicode_val_T u;
|
||||||
|
char *utf8_char = (char *)utf8_char_const;
|
||||||
|
|
||||||
if (end == NULL)
|
if (end == NULL)
|
||||||
end = strchr(utf8_char, '\0');
|
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
|
/* Count number of standard terminal cells needed for displaying string
|
||||||
* with UTF-8 characters. */
|
* with UTF-8 characters. */
|
||||||
int
|
int
|
||||||
utf8_ptr2cells(char *string, char *end)
|
utf8_ptr2cells(const char *string, char *end)
|
||||||
{
|
{
|
||||||
int charlen, cell, cells = 0;
|
int charlen, cell, cells = 0;
|
||||||
|
|
||||||
|
@ -136,8 +136,8 @@ char *encode_utf8(unicode_val_T);
|
|||||||
#ifdef CONFIG_UTF8
|
#ifdef CONFIG_UTF8
|
||||||
char *utf8_prevchar(char *, int, char *);
|
char *utf8_prevchar(char *, int, char *);
|
||||||
int utf8charlen(const char *);
|
int utf8charlen(const char *);
|
||||||
int utf8_char2cells(char *, char *);
|
int utf8_char2cells(const char *, char *);
|
||||||
int utf8_ptr2cells(char *, char *);
|
int utf8_ptr2cells(const char *, char *);
|
||||||
int utf8_ptr2chars(char *, char *);
|
int utf8_ptr2chars(char *, char *);
|
||||||
int utf8_cells2bytes(char *, int, char *);
|
int utf8_cells2bytes(char *, int, char *);
|
||||||
/* How utf8_step_forward and utf8_step_backward count steps. */
|
/* How utf8_step_forward and utf8_step_backward count steps. */
|
||||||
|
Loading…
Reference in New Issue
Block a user