1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

[draw] const char * in draw_text

This commit is contained in:
Witold Filipczyk 2022-01-31 16:18:43 +01:00
parent 83da43fb98
commit b982bd9abf
3 changed files with 7 additions and 6 deletions

View File

@ -63,7 +63,7 @@ display_checkbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
{
struct terminal *term = dlg_data->win->term;
struct color_pair *color;
char *text;
const char *text;
struct el_box *pos = &widget_data->box;
int selected = is_selected_widget(dlg_data, widget_data);

View File

@ -422,10 +422,11 @@ draw_shadow(struct terminal *term, struct el_box *box,
#ifdef CONFIG_UTF8
static void
draw_text_utf8(struct terminal *term, int x, int y,
char *text, int length,
const char *text2, int length,
int attr, struct color_pair *color)
{
struct screen_char *start, *pos;
char *text = (char *)text2;
char *end = text + length;
unicode_val_T data;
@ -495,7 +496,7 @@ draw_text_utf8(struct terminal *term, int x, int y,
void
draw_text(struct terminal *term, int x, int y,
char *text, int length,
const char *text, int length,
int attr, struct color_pair *color)
{
int end_pos;
@ -561,7 +562,7 @@ draw_text(struct terminal *term, int x, int y,
void
draw_dlg_text(struct dialog_data *dlg_data, int x, int y,
char *text, int length,
const char *text, int length,
int attr, struct color_pair *color)
{
struct terminal *term = dlg_data->win->term;

View File

@ -290,13 +290,13 @@ void fix_dwchar_around_box(struct terminal *term, struct el_box *box, int border
/** Draws @a length chars from @a text. */
void draw_text(struct terminal *term, int x, int y,
char *text, int length,
const char *text, int length,
int attr,
struct color_pair *color);
/** Draws text for dialogs. */
void draw_dlg_text(struct dialog_data *dlg_data, int x, int y,
char *text, int length,
const char *text, int length,
int attr, struct color_pair *color);