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:
parent
83da43fb98
commit
b982bd9abf
@ -63,7 +63,7 @@ display_checkbox(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
|||||||
{
|
{
|
||||||
struct terminal *term = dlg_data->win->term;
|
struct terminal *term = dlg_data->win->term;
|
||||||
struct color_pair *color;
|
struct color_pair *color;
|
||||||
char *text;
|
const char *text;
|
||||||
struct el_box *pos = &widget_data->box;
|
struct el_box *pos = &widget_data->box;
|
||||||
int selected = is_selected_widget(dlg_data, widget_data);
|
int selected = is_selected_widget(dlg_data, widget_data);
|
||||||
|
|
||||||
|
@ -422,10 +422,11 @@ draw_shadow(struct terminal *term, struct el_box *box,
|
|||||||
#ifdef CONFIG_UTF8
|
#ifdef CONFIG_UTF8
|
||||||
static void
|
static void
|
||||||
draw_text_utf8(struct terminal *term, int x, int y,
|
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)
|
int attr, struct color_pair *color)
|
||||||
{
|
{
|
||||||
struct screen_char *start, *pos;
|
struct screen_char *start, *pos;
|
||||||
|
char *text = (char *)text2;
|
||||||
char *end = text + length;
|
char *end = text + length;
|
||||||
unicode_val_T data;
|
unicode_val_T data;
|
||||||
|
|
||||||
@ -495,7 +496,7 @@ draw_text_utf8(struct terminal *term, int x, int y,
|
|||||||
|
|
||||||
void
|
void
|
||||||
draw_text(struct terminal *term, int x, int y,
|
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 attr, struct color_pair *color)
|
||||||
{
|
{
|
||||||
int end_pos;
|
int end_pos;
|
||||||
@ -561,7 +562,7 @@ draw_text(struct terminal *term, int x, int y,
|
|||||||
|
|
||||||
void
|
void
|
||||||
draw_dlg_text(struct dialog_data *dlg_data, int x, int y,
|
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)
|
int attr, struct color_pair *color)
|
||||||
{
|
{
|
||||||
struct terminal *term = dlg_data->win->term;
|
struct terminal *term = dlg_data->win->term;
|
||||||
|
@ -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. */
|
/** Draws @a length chars from @a text. */
|
||||||
void draw_text(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,
|
int attr,
|
||||||
struct color_pair *color);
|
struct color_pair *color);
|
||||||
|
|
||||||
/** Draws text for dialogs. */
|
/** Draws text for dialogs. */
|
||||||
void draw_dlg_text(struct dialog_data *dlg_data, 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);
|
int attr, struct color_pair *color);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user