Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #817
Browse files Browse the repository at this point in the history
 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
  • Loading branch information
slouken committed Oct 4, 2009
1 parent a6a7984 commit 59224fd
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
5 changes: 3 additions & 2 deletions test/testatomic.c
@@ -1,3 +1,4 @@
#include <stdio.h>
#include "SDL.h"

/* Make sure we have good macros for printing 32 and 64 bit values */
Expand All @@ -17,7 +18,7 @@
after calling each function.
*/

char *
char *
tf(SDL_bool tf)
{
static char *t = "true";
Expand All @@ -30,7 +31,7 @@ tf(SDL_bool tf)

return f;
}

int
main(int argc, char *argv[])
{
Expand Down
1 change: 1 addition & 0 deletions test/testaudioinfo.c
@@ -1,3 +1,4 @@
#include <stdio.h>
#include "SDL.h"

static void
Expand Down
1 change: 1 addition & 0 deletions test/testhaptic.c
Expand Up @@ -14,6 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
/*
* includes
*/
#include <stdlib.h>
#include "SDL.h"
#include "SDL_haptic.h"

Expand Down
10 changes: 5 additions & 5 deletions test/testime.c
@@ -1,5 +1,5 @@
/* A simple program to test the Input Method support in the SDL library (1.3+) */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand All @@ -8,7 +8,7 @@
#ifdef HAVE_SDL_TTF
#include "SDL_ttf.h"
#endif

#define DEFAULT_PTSIZE 30
#define DEFAULT_FONT "/System/Library/Fonts/华文细黑.ttf"
#define MAX_TEXT_LENGTH 256
Expand Down Expand Up @@ -210,13 +210,13 @@ HotKey_ToggleFullScreen(void)

int main(int argc, char *argv[])
{
SDL_Event event;
int done = 0;

InitVideo(argc, argv);
InitInput();
Redraw();

SDL_Event event;
int done = 0;

while (! done && SDL_WaitEvent(&event))
{
switch (event.type)
Expand Down
3 changes: 2 additions & 1 deletion test/testloadso.c
@@ -1,9 +1,10 @@

/* Test program to test dynamic loading with the loadso subsystem.
/* Test program to test dynamic loading with the loadso subsystem.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "SDL.h"

Expand Down
2 changes: 2 additions & 0 deletions test/testsprite.c
Expand Up @@ -2,6 +2,8 @@

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <math.h>

Expand Down
2 changes: 2 additions & 0 deletions test/testwm2.c
Expand Up @@ -52,6 +52,8 @@ main(int argc, char *argv[])
}
}
quit(0);
// keep the compiler happy ...
return(0);
}

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 59224fd

Please sign in to comment.