summaryrefslogtreecommitdiff
path: root/textscreen
diff options
context:
space:
mode:
authorSimon Howard2006-09-19 23:49:20 +0000
committerSimon Howard2006-09-19 23:49:20 +0000
commit7bc72c666dc1d1e033c01b60ca38673651c7e81c (patch)
tree9addb24980e13065c07408b74e9618d15ab0c253 /textscreen
parent3b747fcb62f9b3e5ffd9aec2f39c9ecc9f9fc5c8 (diff)
downloadchocolate-doom-7bc72c666dc1d1e033c01b60ca38673651c7e81c.tar.gz
chocolate-doom-7bc72c666dc1d1e033c01b60ca38673651c7e81c.tar.bz2
chocolate-doom-7bc72c666dc1d1e033c01b60ca38673651c7e81c.zip
Fix textscreen warnings.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 626
Diffstat (limited to 'textscreen')
-rw-r--r--textscreen/examples/calculator.c4
-rw-r--r--textscreen/examples/guitest.c23
-rw-r--r--textscreen/txt_button.c1
-rw-r--r--textscreen/txt_checkbox.c1
-rw-r--r--textscreen/txt_desktop.c1
-rw-r--r--textscreen/txt_desktop.h2
-rw-r--r--textscreen/txt_dropdown.c1
-rw-r--r--textscreen/txt_inputbox.c2
-rw-r--r--textscreen/txt_label.c3
-rw-r--r--textscreen/txt_main.c2
-rw-r--r--textscreen/txt_main.h2
-rw-r--r--textscreen/txt_radiobutton.c1
-rw-r--r--textscreen/txt_separator.c2
-rw-r--r--textscreen/txt_strut.c1
-rw-r--r--textscreen/txt_table.c5
-rw-r--r--textscreen/txt_widget.c2
-rw-r--r--textscreen/txt_window.c5
-rw-r--r--textscreen/txt_window_action.c2
18 files changed, 26 insertions, 34 deletions
diff --git a/textscreen/examples/calculator.c b/textscreen/examples/calculator.c
index 0c416f7c..79f8b6ee 100644
--- a/textscreen/examples/calculator.c
+++ b/textscreen/examples/calculator.c
@@ -99,6 +99,8 @@ void Calculate(TXT_UNCAST_ARG(button), void *unused)
case OP_DIV:
input_value = first_operand / input_value;
break;
+ case OP_NONE:
+ break;
}
UpdateInputBox();
@@ -156,5 +158,7 @@ int main(int argc, char *argv[])
BuildGUI();
TXT_GUIMainLoop();
+
+ return 0;
}
diff --git a/textscreen/examples/guitest.c b/textscreen/examples/guitest.c
index 9c96e2e5..b5bd1ea5 100644
--- a/textscreen/examples/guitest.c
+++ b/textscreen/examples/guitest.c
@@ -64,7 +64,7 @@ void SetupWindow(void)
{
txt_window_t *window;
txt_table_t *table;
- txt_table_t *leftpane, *rightpane;
+ txt_table_t *rightpane;
txt_button_t *button;
txt_checkbox_t *cheesy_checkbox;
txt_window_action_t *pwn;
@@ -159,25 +159,6 @@ void Window2(void)
TXT_AddWidget(table, TXT_NewIntInputBox(&numbox_value, 10));
}
-void DrawASCIIChart()
-{
- int x, y;
-
- TXT_ClearScreen();
-
- for (y=0; y<16; ++y)
- {
- for (x=0; x<16; ++x)
- {
- TXT_PutChar(' ');
- TXT_PutChar(' ');
- TXT_PutChar(' ');
- TXT_PutChar(y * 16 + x);
- }
- TXT_PutChar('\n');
- }
-}
-
int main(int argc, char *argv[])
{
TXT_Init();
@@ -188,6 +169,8 @@ int main(int argc, char *argv[])
SetupWindow();
TXT_GUIMainLoop();
+
+ return 0;
}
diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c
index fa808095..9e5b6d0d 100644
--- a/textscreen/txt_button.c
+++ b/textscreen/txt_button.c
@@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_button.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
diff --git a/textscreen/txt_checkbox.c b/textscreen/txt_checkbox.c
index 40eae131..bb26211f 100644
--- a/textscreen/txt_checkbox.c
+++ b/textscreen/txt_checkbox.c
@@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_checkbox.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c
index a55febb0..085712fe 100644
--- a/textscreen/txt_desktop.c
+++ b/textscreen/txt_desktop.c
@@ -26,6 +26,7 @@
#include "txt_desktop.h"
#include "txt_gui.h"
+#include "txt_io.h"
#include "txt_main.h"
#include "txt_separator.h"
#include "txt_window.h"
diff --git a/textscreen/txt_desktop.h b/textscreen/txt_desktop.h
index cf7991da..40c89a48 100644
--- a/textscreen/txt_desktop.h
+++ b/textscreen/txt_desktop.h
@@ -31,6 +31,8 @@ void TXT_DrawDesktop(void);
void TXT_GUIMainLoop(void);
void TXT_DispatchEvents(void);
void TXT_ExitMainLoop(void);
+void TXT_DrawWindow(txt_window_t *window, int selected);
+void TXT_WindowKeyPress(txt_window_t *window, int c);
#endif /* #ifndef TXT_DESKTOP_T */
diff --git a/textscreen/txt_dropdown.c b/textscreen/txt_dropdown.c
index 99927c39..0dbdec4d 100644
--- a/textscreen/txt_dropdown.c
+++ b/textscreen/txt_dropdown.c
@@ -26,6 +26,7 @@
#include "txt_button.h"
#include "txt_dropdown.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
diff --git a/textscreen/txt_inputbox.c b/textscreen/txt_inputbox.c
index e1cd5648..c3f4f255 100644
--- a/textscreen/txt_inputbox.c
+++ b/textscreen/txt_inputbox.c
@@ -19,6 +19,7 @@
// 02111-1307, USA.
//
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -26,6 +27,7 @@
#include "doomkeys.h"
#include "txt_inputbox.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
diff --git a/textscreen/txt_label.c b/textscreen/txt_label.c
index 6434f5f6..86250372 100644
--- a/textscreen/txt_label.c
+++ b/textscreen/txt_label.c
@@ -23,6 +23,7 @@
#include <string.h>
#include "txt_label.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
@@ -40,7 +41,7 @@ static void TXT_LabelDrawer(TXT_UNCAST_ARG(label), int selected)
TXT_CAST_ARG(txt_label_t, label);
int x, y;
int origin_x, origin_y;
- int align_indent;
+ int align_indent = 0;
int w;
w = label->widget.w;
diff --git a/textscreen/txt_main.c b/textscreen/txt_main.c
index f580d942..72760449 100644
--- a/textscreen/txt_main.c
+++ b/textscreen/txt_main.c
@@ -25,6 +25,8 @@
//-----------------------------------------------------------------------------
#include <SDL.h>
+
+#include <ctype.h>
#include <stdlib.h>
#include <string.h>
diff --git a/textscreen/txt_main.h b/textscreen/txt_main.h
index ac915234..49986faf 100644
--- a/textscreen/txt_main.h
+++ b/textscreen/txt_main.h
@@ -97,7 +97,7 @@ void TXT_GetKeyDescription(int key, char *buf);
// Retrieve the current position of the mouse
-void TXT_GetMouseState(int *x, int *y);
+void TXT_GetMousePosition(int *x, int *y);
// Sleep until an event is received or the screen needs updating
// Optional timeout in ms (timeout == 0 : sleep forever)
diff --git a/textscreen/txt_radiobutton.c b/textscreen/txt_radiobutton.c
index 0f24a783..411772f0 100644
--- a/textscreen/txt_radiobutton.c
+++ b/textscreen/txt_radiobutton.c
@@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_radiobutton.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
diff --git a/textscreen/txt_separator.c b/textscreen/txt_separator.c
index e1d739e6..690873a7 100644
--- a/textscreen/txt_separator.c
+++ b/textscreen/txt_separator.c
@@ -23,6 +23,7 @@
#include <string.h>
#include "txt_separator.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
@@ -48,7 +49,6 @@ static void TXT_SeparatorSizeCalc(TXT_UNCAST_ARG(separator))
static void TXT_SeparatorDrawer(TXT_UNCAST_ARG(separator), int selected)
{
TXT_CAST_ARG(txt_separator_t, separator);
- int i;
int x, y;
int w;
diff --git a/textscreen/txt_strut.c b/textscreen/txt_strut.c
index 48fe8fa8..a3fb9084 100644
--- a/textscreen/txt_strut.c
+++ b/textscreen/txt_strut.c
@@ -50,6 +50,7 @@ static void TXT_StrutDestructor(TXT_UNCAST_ARG(strut))
static int TXT_StrutKeyPress(TXT_UNCAST_ARG(strut), int key)
{
+ return 0;
}
txt_widget_class_t txt_strut_class =
diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c
index b04ce7cb..a063f05d 100644
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -27,6 +27,7 @@
#include "txt_desktop.h"
#include "txt_gui.h"
+#include "txt_io.h"
#include "txt_main.h"
#include "txt_separator.h"
#include "txt_strut.h"
@@ -61,7 +62,6 @@ static void CalcRowColSizes(txt_table_t *table,
int *row_heights,
int *col_widths)
{
- int table_height;
int x, y;
int rows;
txt_widget_t *widget;
@@ -194,7 +194,6 @@ static int SelectableWidget(txt_table_t *table, int x, int y)
static int FindSelectableColumn(txt_table_t *table, int row, int start_col)
{
int x;
- int i;
for (x=0; x<table->columns; ++x)
{
@@ -287,7 +286,6 @@ static int TXT_TableKeyPress(TXT_UNCAST_ARG(table), int key)
if (key == KEY_LEFTARROW)
{
int new_x;
- int i;
// Move cursor left
@@ -307,7 +305,6 @@ static int TXT_TableKeyPress(TXT_UNCAST_ARG(table), int key)
if (key == KEY_RIGHTARROW)
{
int new_x;
- int i;
// Move cursor left
diff --git a/textscreen/txt_widget.c b/textscreen/txt_widget.c
index c66cf8dc..2f019c94 100644
--- a/textscreen/txt_widget.c
+++ b/textscreen/txt_widget.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
+#include "txt_io.h"
#include "txt_widget.h"
typedef struct
@@ -100,7 +101,6 @@ void TXT_SignalConnect(TXT_UNCAST_ARG(widget),
TXT_CAST_ARG(txt_widget_t, widget);
txt_callback_table_t *table;
txt_callback_t *callback;
- int i;
table = widget->callback_table;
diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c
index e024cf4e..5c27e6a5 100644
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -45,8 +45,6 @@ void TXT_SetWindowAction(txt_window_t *window,
txt_window_t *TXT_NewWindow(char *title)
{
int i;
- txt_window_action_t *cancel_action;
- txt_window_action_t *accept_action;
txt_window_t *win;
@@ -289,9 +287,6 @@ void TXT_LayoutWindow(txt_window_t *window)
void TXT_DrawWindow(txt_window_t *window, int selected)
{
txt_widget_t *widgets;
- int x, y;
- int i;
- int ww, wh;
TXT_LayoutWindow(window);
diff --git a/textscreen/txt_window_action.c b/textscreen/txt_window_action.c
index 9c9094ff..473f792d 100644
--- a/textscreen/txt_window_action.c
+++ b/textscreen/txt_window_action.c
@@ -25,6 +25,7 @@
#include "doomkeys.h"
#include "txt_window_action.h"
+#include "txt_gui.h"
#include "txt_io.h"
#include "txt_main.h"
#include "txt_window.h"
@@ -45,7 +46,6 @@ static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action))
static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action), int selected)
{
TXT_CAST_ARG(txt_window_action_t, action);
- int i;
char buf[10];
TXT_GetKeyDescription(action->key, buf);