Avoid compiler warnings.
This commit is contained in:
parent
fab4acbfe4
commit
be675345ad
|
@ -29,7 +29,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the "ctk" console GUI toolkit for cc65
|
* This file is part of the "ctk" console GUI toolkit for cc65
|
||||||
*
|
*
|
||||||
* $Id: ctk-conio-service.c,v 1.1 2006/06/17 22:41:15 adamdunkels Exp $
|
* $Id: ctk-conio-service.c,v 1.2 2006/08/13 14:08:43 oliverschmidt Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ draw_widget(struct ctk_widget *w,
|
||||||
}
|
}
|
||||||
x = xpos;
|
x = xpos;
|
||||||
|
|
||||||
len = strlen(w->widget.icon.title);
|
len = (unsigned char)strlen(w->widget.icon.title);
|
||||||
if(x + len >= sizex) {
|
if(x + len >= sizex) {
|
||||||
x = sizex - len;
|
x = sizex - len;
|
||||||
}
|
}
|
||||||
|
@ -491,10 +491,10 @@ s_ctk_draw_menus(struct ctk_menus *menus)
|
||||||
|
|
||||||
/* Draw desktopmenu */
|
/* Draw desktopmenu */
|
||||||
if(wherex() + strlen(menus->desktopmenu->title) + 1 >= sizex) {
|
if(wherex() + strlen(menus->desktopmenu->title) + 1 >= sizex) {
|
||||||
gotoxy(sizex - strlen(menus->desktopmenu->title) - 1, 0);
|
gotoxy(sizex - (unsigned char)strlen(menus->desktopmenu->title) - 1, 0);
|
||||||
} else {
|
} else {
|
||||||
cclear(sizex - wherex() -
|
cclear(sizex - wherex() -
|
||||||
strlen(menus->desktopmenu->title) - 1);
|
(unsigned char)strlen(menus->desktopmenu->title) - 1);
|
||||||
}
|
}
|
||||||
draw_menu(menus->desktopmenu, menus->desktopmenu == menus->open);
|
draw_menu(menus->desktopmenu, menus->desktopmenu == menus->open);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: ctk.c,v 1.1 2006/06/17 22:41:16 adamdunkels Exp $
|
* $Id: ctk.c,v 1.2 2006/08/13 14:11:41 oliverschmidt Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -675,7 +675,7 @@ window_new(CC_REGISTER_ARG struct ctk_window *window,
|
||||||
window->h = h;
|
window->h = h;
|
||||||
window->title = title;
|
window->title = title;
|
||||||
if(title != NULL) {
|
if(title != NULL) {
|
||||||
window->titlelen = strlen(title);
|
window->titlelen = (unsigned char)strlen(title);
|
||||||
} else {
|
} else {
|
||||||
window->titlelen = 0;
|
window->titlelen = 0;
|
||||||
}
|
}
|
||||||
|
@ -750,7 +750,7 @@ ctk_menu_new(CC_REGISTER_ARG struct ctk_menu *menu,
|
||||||
#if CTK_CONF_MENUS
|
#if CTK_CONF_MENUS
|
||||||
menu->next = NULL;
|
menu->next = NULL;
|
||||||
menu->title = title;
|
menu->title = title;
|
||||||
menu->titlelen = strlen(title);
|
menu->titlelen = (unsigned char)strlen(title);
|
||||||
menu->active = 0;
|
menu->active = 0;
|
||||||
menu->nitems = 0;
|
menu->nitems = 0;
|
||||||
#endif /* CTK_CONF_MENUS */
|
#endif /* CTK_CONF_MENUS */
|
||||||
|
@ -778,7 +778,7 @@ ctk_menuitem_add(CC_REGISTER_ARG struct ctk_menu *menu,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
menu->items[menu->nitems].title = name;
|
menu->items[menu->nitems].title = name;
|
||||||
menu->items[menu->nitems].titlelen = strlen(name);
|
menu->items[menu->nitems].titlelen = (unsigned char)strlen(name);
|
||||||
return menu->nitems++;
|
return menu->nitems++;
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1182,7 +1182,7 @@ textentry_input(ctk_arch_key_t c,
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
case CH_CURS_DOWN:
|
case CH_CURS_DOWN:
|
||||||
txpos = strlen(t->text);
|
txpos = (unsigned char)strlen(t->text);
|
||||||
if(txpos == tlen) {
|
if(txpos == tlen) {
|
||||||
--txpos;
|
--txpos;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue