comparison test/testime.c @ 3338:9de326b3099c

Fixed bug #817 Daniele Forghieri 2009-09-30 15:48:24 PDT Some tests doesn't use the correct include statement (and there are some missing declaration) and some test use C++ variable after statement, preventing compile wicth Open Watcom The patch attached fixes this
author Sam Lantinga <slouken@libsdl.org>
date Sun, 04 Oct 2009 09:55:20 +0000
parents 2d3a9f229ba1
children f7541260e89c
comparison
equal deleted inserted replaced
3337:9ac6f0782dd6 3338:9de326b3099c
1 /* A simple program to test the Input Method support in the SDL library (1.3+) */ 1 /* A simple program to test the Input Method support in the SDL library (1.3+) */
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 #include <stdio.h> 4 #include <stdio.h>
5 #include <string.h> 5 #include <string.h>
6 6
7 #include "SDL.h" 7 #include "SDL.h"
8 #ifdef HAVE_SDL_TTF 8 #ifdef HAVE_SDL_TTF
9 #include "SDL_ttf.h" 9 #include "SDL_ttf.h"
10 #endif 10 #endif
11 11
12 #define DEFAULT_PTSIZE 30 12 #define DEFAULT_PTSIZE 30
13 #define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf" 13 #define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf"
14 #define MAX_TEXT_LENGTH 256 14 #define MAX_TEXT_LENGTH 256
15 15
16 SDL_Surface *screen; 16 SDL_Surface *screen;
208 } 208 }
209 } 209 }
210 210
211 int main(int argc, char *argv[]) 211 int main(int argc, char *argv[])
212 { 212 {
213 SDL_Event event;
214 int done = 0;
215
213 InitVideo(argc, argv); 216 InitVideo(argc, argv);
214 InitInput(); 217 InitInput();
215 Redraw(); 218 Redraw();
216
217 SDL_Event event;
218 int done = 0;
219 219
220 while (! done && SDL_WaitEvent(&event)) 220 while (! done && SDL_WaitEvent(&event))
221 { 221 {
222 switch (event.type) 222 switch (event.type)
223 { 223 {