ref: 0cff90defcb069c351fd81bed9e57f3519c70ef7
parent: e903ecbffbc1a90f9206dbb49e6727e58889da3d
author: Simon Howard <[email protected]>
date: Thu Sep 21 12:25:10 EDT 2006
Fix some warnings in textscreen code. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 645
--- a/textscreen/txt_dropdown.c
+++ b/textscreen/txt_dropdown.c
@@ -190,7 +190,7 @@
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.
--- a/textscreen/txt_inputbox.h
+++ b/textscreen/txt_inputbox.h
@@ -30,7 +30,7 @@
{
txt_widget_t widget;
char *buffer;
- int size;
+ unsigned int size;
int editing;
void *value;
};
--- a/textscreen/txt_label.c
+++ b/textscreen/txt_label.c
@@ -39,10 +39,10 @@
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 @@
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
--- a/textscreen/txt_label.h
+++ b/textscreen/txt_label.h
@@ -32,7 +32,7 @@
txt_widget_t widget;
char *label;
char **lines;
- int w, h;
+ unsigned int w, h;
txt_color_t fgcolor;
txt_color_t bgcolor;
};
--- a/textscreen/txt_main.c
+++ b/textscreen/txt_main.c
@@ -420,7 +420,7 @@
void TXT_Sleep(int timeout)
{
- int start_time;
+ unsigned int start_time;
if (TXT_ScreenHasBlinkingChars())
{
--- a/textscreen/txt_separator.c
+++ b/textscreen/txt_separator.c
@@ -87,6 +87,7 @@
NULL,
TXT_SeparatorDestructor,
NULL,
+ NULL,
};
txt_separator_t *TXT_NewSeparator(char *label)
--- a/textscreen/txt_spinctrl.c
+++ b/textscreen/txt_spinctrl.c
@@ -73,7 +73,7 @@
{
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 @@
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;
--- a/textscreen/txt_strut.c
+++ b/textscreen/txt_strut.c
@@ -60,6 +60,7 @@
TXT_StrutKeyPress,
TXT_StrutDestructor,
NULL,
+ NULL,
};
txt_strut_t *TXT_NewStrut(int width, int height)
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -59,8 +59,8 @@
}
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 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 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;
--- a/textscreen/txt_widget.h
+++ b/textscreen/txt_widget.h
@@ -76,7 +76,7 @@
// 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);
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -191,7 +191,8 @@
}
}
-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 @@
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
--- a/textscreen/txt_window.h
+++ b/textscreen/txt_window.h
@@ -65,7 +65,7 @@
// 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);