mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[bfu] const
This commit is contained in:
parent
57ebe52948
commit
5ea99371dd
@ -38,12 +38,13 @@ add_dlg_text(struct dialog *dlg, char *text,
|
|||||||
/* Returns length of substring (from start of @text) before a split. */
|
/* Returns length of substring (from start of @text) before a split. */
|
||||||
#ifdef CONFIG_UTF8
|
#ifdef CONFIG_UTF8
|
||||||
static inline int
|
static inline int
|
||||||
split_line(char *text, int max_width, int *cells, int utf8)
|
split_line(const char *text2, int max_width, int *cells, int utf8)
|
||||||
#else
|
#else
|
||||||
static inline int
|
static inline int
|
||||||
split_line(char *text, int max_width, int *cells)
|
split_line(const char *text2, int max_width, int *cells)
|
||||||
#endif /* CONFIG_UTF8 */
|
#endif /* CONFIG_UTF8 */
|
||||||
{
|
{
|
||||||
|
char *text = (char *)text2;
|
||||||
char *split = text;
|
char *split = text;
|
||||||
#ifdef CONFIG_UTF8
|
#ifdef CONFIG_UTF8
|
||||||
char *text_end = split + strlen(split);
|
char *text_end = split + strlen(split);
|
||||||
@ -212,7 +213,7 @@ split_lines(struct widget_data *widget_data, int max_width)
|
|||||||
/* Format text according to dialog box and alignment. */
|
/* Format text according to dialog box and alignment. */
|
||||||
void
|
void
|
||||||
dlg_format_text_do(struct dialog_data *dlg_data,
|
dlg_format_text_do(struct dialog_data *dlg_data,
|
||||||
char *text,
|
const char *text,
|
||||||
int x, int *y, int width, int *real_width,
|
int x, int *y, int width, int *real_width,
|
||||||
struct color_pair *color, format_align_T align,
|
struct color_pair *color, format_align_T align,
|
||||||
int format_only)
|
int format_only)
|
||||||
|
@ -51,7 +51,7 @@ void add_dlg_text(struct dialog *dlg, char *text,
|
|||||||
|
|
||||||
extern const struct widget_ops text_ops;
|
extern const struct widget_ops text_ops;
|
||||||
void dlg_format_text_do(struct dialog_data *dlg_data,
|
void dlg_format_text_do(struct dialog_data *dlg_data,
|
||||||
char *text, int x, int *y, int w, int *rw,
|
const char *text, int x, int *y, int w, int *rw,
|
||||||
struct color_pair *scolor, format_align_T align, int format_only);
|
struct color_pair *scolor, format_align_T align, int format_only);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -402,7 +402,7 @@ utf8_ptr2chars(char *string, char *end)
|
|||||||
* specified number of cells.
|
* specified number of cells.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
utf8_cells2bytes(char *string, int max_cells, char *end)
|
utf8_cells2bytes(const char *string, int max_cells, char *end)
|
||||||
{
|
{
|
||||||
unsigned int bytes = 0, cells = 0;
|
unsigned int bytes = 0, cells = 0;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ int utf8charlen(const char *);
|
|||||||
int utf8_char2cells(const char *, char *);
|
int utf8_char2cells(const char *, char *);
|
||||||
int utf8_ptr2cells(const 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(const char *, int, char *);
|
||||||
/* How utf8_step_forward and utf8_step_backward count steps. */
|
/* How utf8_step_forward and utf8_step_backward count steps. */
|
||||||
enum utf8_step {
|
enum utf8_step {
|
||||||
/* Each step is one character, even if it is a combining or
|
/* Each step is one character, even if it is a combining or
|
||||||
|
Loading…
x
Reference in New Issue
Block a user