mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -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. */
|
||||
#ifdef CONFIG_UTF8
|
||||
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
|
||||
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 */
|
||||
{
|
||||
char *text = (char *)text2;
|
||||
char *split = text;
|
||||
#ifdef CONFIG_UTF8
|
||||
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. */
|
||||
void
|
||||
dlg_format_text_do(struct dialog_data *dlg_data,
|
||||
char *text,
|
||||
const char *text,
|
||||
int x, int *y, int width, int *real_width,
|
||||
struct color_pair *color, format_align_T align,
|
||||
int format_only)
|
||||
|
@ -51,7 +51,7 @@ void add_dlg_text(struct dialog *dlg, char *text,
|
||||
|
||||
extern const struct widget_ops text_ops;
|
||||
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);
|
||||
|
||||
void
|
||||
|
@ -402,7 +402,7 @@ utf8_ptr2chars(char *string, char *end)
|
||||
* specified number of cells.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@ -139,7 +139,7 @@ int utf8charlen(const char *);
|
||||
int utf8_char2cells(const char *, char *);
|
||||
int utf8_ptr2cells(const 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. */
|
||||
enum utf8_step {
|
||||
/* Each step is one character, even if it is a combining or
|
||||
|
Loading…
Reference in New Issue
Block a user