summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/strw.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/eve/widget/strw.c')
-rw-r--r--fw/fe310/eos/eve/widget/strw.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fw/fe310/eos/eve/widget/strw.c b/fw/fe310/eos/eve/widget/strw.c
index 6bddbe9..cd1f51d 100644
--- a/fw/fe310/eos/eve/widget/strw.c
+++ b/fw/fe310/eos/eve/widget/strw.c
@@ -29,7 +29,8 @@
void eve_strw_init(EVEStrWidget *widget, EVERect *g, EVEPage *page, EVEFont *font, utf8_t *str, uint16_t str_size) {
EVEWidget *_widget = &widget->w;
- int rv, str_len;
+ size_t str_len;
+ int rv;
memset(widget, 0, sizeof(EVEStrWidget));
eve_widget_init(_widget, EVE_WIDGET_TYPE_STR, g, page, eve_strw_draw, eve_strw_touch, eve_strw_putc);
@@ -47,7 +48,8 @@ void eve_strw_init(EVEStrWidget *widget, EVERect *g, EVEPage *page, EVEFont *fon
}
int eve_strw_update(EVEStrWidget *widget) {
- int rv, str_len;
+ size_t str_len;
+ int rv;
rv = utf8_verify(widget->str, widget->str_size, &str_len);
if (rv != UTF_OK) {
@@ -317,7 +319,7 @@ void eve_strw_putc(void *w, int c) {
if (!cursor1->on) return;
if (!cursor2->on && ((c == CH_BS) || (c == CH_DEL))) {
- utf32_t uc;
+ ucp_t uc;
str = widget->str + cursor1->ch;
switch (c) {
@@ -371,7 +373,8 @@ void eve_strw_putc(void *w, int c) {
ins_c = utf8_enc(c, utf8_buf);
ins_w = eve_font_ch_w(widget->font, c);
} else if (c == CH_CTRLV) {
- int rv, clipb_len = 0;
+ size_t clipb_len = 0;
+ int rv;
clipb = eve_clipb_get();
if (clipb) {
@@ -413,7 +416,7 @@ void eve_strw_putc(void *w, int c) {
void eve_strw_cursor_set(EVEStrWidget *widget, EVEStrCursor *cursor, int16_t x) {
int i;
int16_t _x, _d;
- utf32_t ch;
+ ucp_t ch;
uint8_t ch_w;
uint8_t ch_l;
EVEWidget *_widget = &widget->w;