Fix some warnings in textscreen code.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 645
This commit is contained in:
Simon Howard 2006-09-21 16:25:10 +00:00
parent e903ecbffb
commit 0cff90defc
12 changed files with 25 additions and 21 deletions

View file

@ -190,7 +190,7 @@ static void TXT_DropdownListSizeCalc(TXT_UNCAST_ARG(list))
static void TXT_DropdownListDrawer(TXT_UNCAST_ARG(list), int selected)
{
TXT_CAST_ARG(txt_dropdown_list_t, list);
int i;
unsigned int i;
char *str;
// Set bg/fg text colors.

View file

@ -30,7 +30,7 @@ struct txt_inputbox_s
{
txt_widget_t widget;
char *buffer;
int size;
unsigned int size;
int editing;
void *value;
};

View file

@ -39,10 +39,10 @@ static void TXT_LabelSizeCalc(TXT_UNCAST_ARG(label))
static void TXT_LabelDrawer(TXT_UNCAST_ARG(label), int selected)
{
TXT_CAST_ARG(txt_label_t, label);
int x, y;
unsigned int x, y;
int origin_x, origin_y;
int align_indent = 0;
int w;
unsigned int align_indent = 0;
unsigned int w;
w = label->widget.w;
@ -109,12 +109,13 @@ txt_widget_class_t txt_label_class =
NULL,
TXT_LabelDestructor,
NULL,
NULL,
};
void TXT_SetLabel(txt_label_t *label, char *value)
{
char *p;
int y;
unsigned int y;
// Free back the old label

View file

@ -32,7 +32,7 @@ struct txt_label_s
txt_widget_t widget;
char *label;
char **lines;
int w, h;
unsigned int w, h;
txt_color_t fgcolor;
txt_color_t bgcolor;
};

View file

@ -420,7 +420,7 @@ int TXT_ScreenHasBlinkingChars(void)
void TXT_Sleep(int timeout)
{
int start_time;
unsigned int start_time;
if (TXT_ScreenHasBlinkingChars())
{

View file

@ -87,6 +87,7 @@ txt_widget_class_t txt_separator_class =
NULL,
TXT_SeparatorDestructor,
NULL,
NULL,
};
txt_separator_t *TXT_NewSeparator(char *label)

View file

@ -73,7 +73,7 @@ static void TXT_SpinControlDrawer(TXT_UNCAST_ARG(spincontrol), int selected)
{
TXT_CAST_ARG(txt_spincontrol_t, spincontrol);
char buf[20];
int i;
unsigned int i;
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
TXT_BGColor(TXT_COLOR_BLUE, 0);
@ -143,7 +143,7 @@ static void TXT_SpinControlMousePress(TXT_UNCAST_ARG(spincontrol),
int x, int y, int b)
{
TXT_CAST_ARG(txt_spincontrol_t, spincontrol);
int rel_x;
unsigned int rel_x;
rel_x = x - spincontrol->widget.x;

View file

@ -60,6 +60,7 @@ txt_widget_class_t txt_strut_class =
TXT_StrutKeyPress,
TXT_StrutDestructor,
NULL,
NULL,
};
txt_strut_t *TXT_NewStrut(int width, int height)

View file

@ -59,8 +59,8 @@ static int TableRows(txt_table_t *table)
}
static void CalcRowColSizes(txt_table_t *table,
int *row_heights,
int *col_widths)
unsigned int *row_heights,
unsigned int *col_widths)
{
int x, y;
int rows;
@ -98,8 +98,8 @@ static void CalcRowColSizes(txt_table_t *table,
static void TXT_CalcTableSize(TXT_UNCAST_ARG(table))
{
TXT_CAST_ARG(txt_table_t, table);
int *column_widths;
int *row_heights;
unsigned int *column_widths;
unsigned int *row_heights;
int x, y;
int rows;
@ -400,8 +400,8 @@ static void LayoutCell(txt_table_t *table, int x, int y, int col_width,
static void TXT_TableLayout(TXT_UNCAST_ARG(table))
{
TXT_CAST_ARG(txt_table_t, table);
int *column_widths;
int *row_heights;
unsigned int *column_widths;
unsigned int *row_heights;
int draw_x, draw_y;
int x, y;
int i;

View file

@ -76,7 +76,7 @@ struct txt_widget_s
// not be set manually.
int x, y;
int w, h;
unsigned int w, h;
};
void TXT_InitWidget(TXT_UNCAST_ARG(widget), txt_widget_class_t *widget_class);

View file

@ -191,7 +191,8 @@ static void DrawActionArea(txt_window_t *window)
}
}
static void CalcActionAreaSize(txt_window_t *window, int *w, int *h)
static void CalcActionAreaSize(txt_window_t *window,
unsigned int *w, unsigned int *h)
{
txt_widget_t *widget;
int i;
@ -224,8 +225,8 @@ static void CalcActionAreaSize(txt_window_t *window, int *w, int *h)
void TXT_LayoutWindow(txt_window_t *window)
{
txt_widget_t *widgets = (txt_widget_t *) window;
int widgets_w;
int actionarea_w, actionarea_h;
unsigned int widgets_w;
unsigned int actionarea_w, actionarea_h;
// Calculate size of table

View file

@ -65,7 +65,7 @@ struct txt_window_s
// These are set automatically when the window is drawn
int window_x, window_y;
int window_w, window_h;
unsigned int window_w, window_h;
};
txt_window_t *TXT_NewWindow(char *title);