Directx.h - Bug?

Hi

I have found in the directx.h the following Code:

#ifndef directx_h
#define _directx_h

And i think this must be like this:

#ifndef _directx_h
#define _directx_h

I dont know if this is a Failure or not, then i am a “Newbie” at SDL. But i
think its good to post it here, then it can be. Please ignore this Post
simply if this isnt an Error;).

See, you!
Andreas Tomasini

P.S. I know my english isnt that good but i hope you understand what the
meaning is.–
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

I have found in the directx.h the following Code:

#ifndef directx_h
#define _directx_h

In this case, it’s harmless, but yes, that’s a bug.

–ryan.

I have found in the directx.h the following Code:

#ifndef directx_h
#define _directx_h

In this case, it’s harmless, but yes, that’s a bug.

Fixed. Thanks!

I wish most fixes were this easy. :slight_smile:

-Sam Lantinga, Software Engineer, Blizzard Entertainment

I wish most fixes were this easy. :slight_smile:

Ohh, so you like easy fixes do you? In that case… :wink:

I’ve been going through the SDL-ified version of NeHe’s OpenGL intro; from
the SDL website at http://www.libsdl.org/opengl/intro.html

The main thing I noticed was that in some of the programs, SDL_Surface’s are
loaded but are never free’d. The first example is in lesson06.c - an image
is loaded with Load_BMP() (which in turn loads it with SDL_LoadBMP()) to be
converted to an OGL texture, but never freed. SDL_FreeSurface(image1); should
be added after line 89.

There are a number of other files that have this problem. Seems that most of
the simple cases of loading one surface weren’t freed, while the more
complicated ones were.

The attached patch fixes these little bugs. It also reverses the effect of
moving the mouse horizontally in lesson23 (because it’s behaviour is the
reverse of what I would have expected) and removes warnings generated when
compiling with the -Wall option to gcc; mostly these are about malloc() and
free() not being defined - so I included stdlib.h.

It also found this little buggy in lesson 23:
lesson23.c: In function `SetupWorld’:
lesson23.c:108: warning: too few arguments for format

The line in question being:
sscanf(oneline, “%f %f %f %f %f %f %f”, &x, &y, &z, &u, &v);

The patch removes the last two %f’s.

Other purely cosmetic things:
o changed main (…) to int main (…) to remove the warning about the
default return type defaulting to int
o added default: to switch’s on the key type, to remove the big list of
’unhandled value’ warnings
o added parenthesis around things like if (image = LoadBMP()) to remove the
compilers suggest that you do so

I also noticed when extracting the tarball:
tar: OpenGL-intro-1.1.1/Data21/lktheme.mod: time stamp 2012-12-12 13:44:00
is 343915019 s in the futureOn Fri, 18 Jan 2002, Sam Lantinga wrote:

Mike.
-------------- next part --------------
Common subdirectories: OpenGL-intro-1.1.1/Data06 and OpenGL-intro-1.1.1-fixed/Data06
Common subdirectories: OpenGL-intro-1.1.1/Data07 and OpenGL-intro-1.1.1-fixed/Data07
Common subdirectories: OpenGL-intro-1.1.1/Data08 and OpenGL-intro-1.1.1-fixed/Data08
Common subdirectories: OpenGL-intro-1.1.1/Data09 and OpenGL-intro-1.1.1-fixed/Data09
Common subdirectories: OpenGL-intro-1.1.1/Data10 and OpenGL-intro-1.1.1-fixed/Data10
Common subdirectories: OpenGL-intro-1.1.1/Data11 and OpenGL-intro-1.1.1-fixed/Data11
Common subdirectories: OpenGL-intro-1.1.1/Data12 and OpenGL-intro-1.1.1-fixed/Data12
Common subdirectories: OpenGL-intro-1.1.1/Data16 and OpenGL-intro-1.1.1-fixed/Data16
Common subdirectories: OpenGL-intro-1.1.1/Data17 and OpenGL-intro-1.1.1-fixed/Data17
Common subdirectories: OpenGL-intro-1.1.1/Data18 and OpenGL-intro-1.1.1-fixed/Data18
Common subdirectories: OpenGL-intro-1.1.1/Data19 and OpenGL-intro-1.1.1-fixed/Data19
Common subdirectories: OpenGL-intro-1.1.1/Data20 and OpenGL-intro-1.1.1-fixed/Data20
Common subdirectories: OpenGL-intro-1.1.1/Data21 and OpenGL-intro-1.1.1-fixed/Data21
Common subdirectories: OpenGL-intro-1.1.1/Data22 and OpenGL-intro-1.1.1-fixed/Data22
Common subdirectories: OpenGL-intro-1.1.1/Data23 and OpenGL-intro-1.1.1-fixed/Data23
Common subdirectories: OpenGL-intro-1.1.1/Data24 and OpenGL-intro-1.1.1-fixed/Data24
Common subdirectories: OpenGL-intro-1.1.1/Data25 and OpenGL-intro-1.1.1-fixed/Data25
Common subdirectories: OpenGL-intro-1.1.1/Data26 and OpenGL-intro-1.1.1-fixed/Data26
Common subdirectories: OpenGL-intro-1.1.1/Data27 and OpenGL-intro-1.1.1-fixed/Data27
Common subdirectories: OpenGL-intro-1.1.1/Data28 and OpenGL-intro-1.1.1-fixed/Data28
Common subdirectories: OpenGL-intro-1.1.1/Data29 and OpenGL-intro-1.1.1-fixed/Data29
Common subdirectories: OpenGL-intro-1.1.1/Data30 and OpenGL-intro-1.1.1-fixed/Data30
diff -u OpenGL-intro-1.1.1/lesson06.c OpenGL-intro-1.1.1-fixed/lesson06.c
— OpenGL-intro-1.1.1/lesson06.c Sun Apr 29 03:29:28 2001
+++ OpenGL-intro-1.1.1-fixed/lesson06.c Sat Jan 19 02:56:58 2002
@@ -19,6 +19,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
/* floats for x rotation, y rotation, z rotation */
float xrot, yrot, zrot;

@@ -87,6 +89,7 @@
// 2d texture, level of detail 0 (normal), 3 components (red, green, blue), x size from image, y size from image,
// border 0 (normal), rgb color data, unsigned byte data, and finally the data itself.
glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels);

  • SDL_FreeSurface (image1);
    };

/* A general OpenGL initialization function. Sets all of the initial parameters. */
diff -u OpenGL-intro-1.1.1/lesson07.c OpenGL-intro-1.1.1-fixed/lesson07.c
— OpenGL-intro-1.1.1/lesson07.c Sun Apr 29 00:25:20 2001
+++ OpenGL-intro-1.1.1-fixed/lesson07.c Sat Jan 19 02:54:47 2002
@@ -19,6 +19,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
/* lighting on/off (1 = on, 0 = off) */
int light = 0;

@@ -270,6 +272,8 @@
filter = 0;
printf(“Filter is now: %d\n”, filter);
break;

  •          default:
    
  •   	   break;
                  }
              }
          }
    

diff -u OpenGL-intro-1.1.1/lesson08.c OpenGL-intro-1.1.1-fixed/lesson08.c
— OpenGL-intro-1.1.1/lesson08.c Sun Apr 29 00:25:27 2001
+++ OpenGL-intro-1.1.1-fixed/lesson08.c Sat Jan 19 02:54:33 2002
@@ -19,6 +19,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
/* lighting on/off (1 = on, 0 = off) */
int light = 0;

@@ -121,6 +123,7 @@

 // 2d texture, 3 colors, width, height, RGB in that order, byte data, and the data.
 gluBuild2DMipmaps(GL_TEXTURE_2D, 3, image1->w, image1->h, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels); 
  • SDL_FreeSurface (image1);
    };

/* A general OpenGL initialization function. Sets all of the initial parameters. */
@@ -286,6 +289,8 @@
filter = 0;
printf(“Filter is now: %d\n”, filter);
break;

  •          default:
    
  •   	   break;
                  }
              }
          }
    

diff -u OpenGL-intro-1.1.1/lesson09.c OpenGL-intro-1.1.1-fixed/lesson09.c
— OpenGL-intro-1.1.1/lesson09.c Sun Apr 29 00:25:33 2001
+++ OpenGL-intro-1.1.1-fixed/lesson09.c Sat Jan 19 02:54:20 2002
@@ -19,6 +19,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
/* number of stars to have */
#define STAR_NUM 50

@@ -100,6 +102,7 @@
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // scale linearly when image bigger than texture
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // scale linearly when image smalled than texture
glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels);

  • SDL_FreeSurface (image1);
    };

/* A general OpenGL initialization function. Sets all of the initial parameters. */
@@ -235,6 +238,8 @@
printf(“Twinkle was: %d\n”, twinkle);
twinkle = twinkle ? 0 : 1; // switch the current value of twinkle, between 0 and 1.
printf(“Twinkle is now: %d\n”, twinkle);

  •          default:
    
  •   	   break;
                  }
              }
          }
    

diff -u OpenGL-intro-1.1.1/lesson10.c OpenGL-intro-1.1.1-fixed/lesson10.c
— OpenGL-intro-1.1.1/lesson10.c Sun Apr 29 00:25:40 2001
+++ OpenGL-intro-1.1.1-fixed/lesson10.c Sat Jan 19 02:54:07 2002
@@ -20,6 +20,7 @@
#endif
#include “SDL.h”

+#include <stdlib.h>

GLuint loop; // general loop variable
GLuint texture[3]; // storage for 3 textures;
@@ -188,6 +189,7 @@
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // scale linearly when image bigger than texture
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); // scale mipmap when image smalled than texture
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, image1->w, image1->h, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels);

  • SDL_FreeSurface (image1);
    };

/* A general OpenGL initialization function. Sets all of the initial parameters. */
@@ -349,6 +351,8 @@
filter = 0;
printf(“Filter is now: %d\n”, filter);
break;

  •         default:
    
  •   	  break;
                 }
             }
         }
    

diff -u OpenGL-intro-1.1.1/lesson11.c OpenGL-intro-1.1.1-fixed/lesson11.c
— OpenGL-intro-1.1.1/lesson11.c Sun Apr 29 00:25:47 2001
+++ OpenGL-intro-1.1.1-fixed/lesson11.c Sat Jan 19 02:53:50 2002
@@ -20,6 +20,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
float points[ 45 ][ 45 ][3]; // The array for the points on the grid of our "wave"
int wiggle_count = 0;

@@ -87,6 +89,7 @@
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, 3, texture1->w, texture1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, texture1->pixels);

  • SDL_FreeSurface (texture1);
    };

/* A general OpenGL initialization function. Sets all of the initial parameters. */
diff -u OpenGL-intro-1.1.1/lesson12.c OpenGL-intro-1.1.1-fixed/lesson12.c
— OpenGL-intro-1.1.1/lesson12.c Sun Apr 29 00:26:00 2001
+++ OpenGL-intro-1.1.1-fixed/lesson12.c Sat Jan 19 02:53:34 2002
@@ -19,6 +19,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
GLuint texture[1]; // Storage For 1 Texture
GLuint cube; // Storage For The Display List
GLuint top; // Storage For The Second Display List
@@ -151,6 +153,7 @@
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, texture1->w, texture1->h, GL_RGB, GL_UNSIGNED_BYTE, texture1->pixels);

  • SDL_FreeSurface (texture1);
    };

/* A general OpenGL initialization function. Sets all of the initial parameters. /
diff -u OpenGL-intro-1.1.1/lesson16.c OpenGL-intro-1.1.1-fixed/lesson16.c
— OpenGL-intro-1.1.1/lesson16.c Sun Apr 29 00:26:16 2001
+++ OpenGL-intro-1.1.1-fixed/lesson16.c Sat Jan 19 02:53:17 2002
@@ -1,8 +1,8 @@
/

    • This Code Was Created By Christopher Aliotta & Jeff Molofee 2000
      
    • A HUGE Thanks To Fredric Echols For Cleaning Up And Optimizing
      
    • The Base Code, Making It More Flexible!  If You've Found This Code
      
    • Useful, Please Let Me Know.  Visit My Site At nehe.gamedev.net
      
    • This Code Was Created By Christopher Aliotta & Jeff Molofee 2000
    • A HUGE Thanks To Fredric Echols For Cleaning Up And Optimizing
    • The Base Code, Making It More Flexible! If You’ve Found This Code

#include <stdlib.h>
@@ -94,7 +94,7 @@
SDL_Surface *TextureImage[1];

// Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit
  • if (TextureImage[0]=LoadBMP(“Data16/crate.bmp”))
  • if ((TextureImage[0]=LoadBMP(“Data16/crate.bmp”)))
    {
    Status=TRUE; // Set The Status To TRUE

diff -u OpenGL-intro-1.1.1/lesson17.c OpenGL-intro-1.1.1-fixed/lesson17.c
— OpenGL-intro-1.1.1/lesson17.c Thu Oct 25 15:34:50 2001
+++ OpenGL-intro-1.1.1-fixed/lesson17.c Sat Jan 19 02:53:05 2002
@@ -20,6 +20,7 @@
#endif
#include “SDL.h”

+#include <stdlib.h>

#define BOOL int
#define FALSE 0
diff -u OpenGL-intro-1.1.1/lesson18.c OpenGL-intro-1.1.1-fixed/lesson18.c
— OpenGL-intro-1.1.1/lesson18.c Sun Apr 29 00:26:35 2001
+++ OpenGL-intro-1.1.1-fixed/lesson18.c Sat Jan 19 02:52:48 2002
@@ -20,6 +20,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -103,7 +105,7 @@
memset(TextureImage,0,sizeof(void *)*1); // Set The Pointer To NULL

// Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit
  • if (TextureImage[0]=LoadBMP(“Data18/Wall.bmp”))
  • if ((TextureImage[0]=LoadBMP(“Data18/Wall.bmp”)))
    {
    Status=TRUE; // Set The Status To TRUE

diff -u OpenGL-intro-1.1.1/lesson19.c OpenGL-intro-1.1.1-fixed/lesson19.c
— OpenGL-intro-1.1.1/lesson19.c Sun Apr 29 00:26:44 2001
+++ OpenGL-intro-1.1.1-fixed/lesson19.c Sat Jan 19 02:52:17 2002
@@ -18,6 +18,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define MAX_PARTICLES 1000 // Number Of Particles To Create

#define BOOL int
@@ -116,7 +118,7 @@
SDL_Surface *TextureImage[1]; // Create Storage Space For The Textures
memset(TextureImage,0,sizeof(void *)*1); // Set The Pointer To NULL

  •    if (TextureImage[0]=LoadBMP("Data19/Particle.bmp"))	// Load Particle Texture
    
  •    if ((TextureImage[0]=LoadBMP("Data19/Particle.bmp")))	// Load Particle Texture
       {
      	Status=TRUE;								// Set The Status To TRUE
      	glGenTextures(1, &texture[0]);				// Create One Texture
    

@@ -299,7 +301,7 @@
return TRUE; // Success
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson20.c OpenGL-intro-1.1.1-fixed/lesson20.c
— OpenGL-intro-1.1.1/lesson20.c Sun Apr 29 00:26:51 2001
+++ OpenGL-intro-1.1.1-fixed/lesson20.c Sat Jan 19 02:51:47 2002
@@ -20,6 +20,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -259,7 +261,7 @@
return TRUE; // Success
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson21.c OpenGL-intro-1.1.1-fixed/lesson21.c
— OpenGL-intro-1.1.1/lesson21.c Sun Apr 29 00:26:59 2001
+++ OpenGL-intro-1.1.1-fixed/lesson21.c Sat Jan 19 02:02:39 2002
@@ -159,6 +159,7 @@
// 2d texture, level of detail 0 (normal), 3 components (red, green, blue), x size from image, y size from image,
// border 0 (normal), rgb color data, unsigned byte data, and finally the data itself.
glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels);

  • SDL_FreeSurface (image1);

    image1 = LoadBMP(“Data21/Image.bmp”);
    @@ -177,6 +178,7 @@
    // 2d texture, level of detail 0 (normal), 3 components (red, green, blue), x size from image, y size from image,
    // border 0 (normal), rgb color data, unsigned byte data, and finally the data itself.
    glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->w, image1->h, 0, GL_RGB, GL_UNSIGNED_BYTE, image1->pixels);

  • SDL_FreeSurface (image1);

};

diff -u OpenGL-intro-1.1.1/lesson22.c OpenGL-intro-1.1.1-fixed/lesson22.c
— OpenGL-intro-1.1.1/lesson22.c Sun Apr 29 03:11:58 2001
+++ OpenGL-intro-1.1.1-fixed/lesson22.c Sat Jan 19 02:50:50 2002
@@ -30,6 +30,8 @@
#include “Glext.h” // Header File For Multitexturing
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -239,7 +241,7 @@
int i;

// Load The Tile-Bitmap For Base-Texture
  • if (Image=LoadBMP(“Data22/Base.bmp”)) {
  • if ((Image=LoadBMP(“Data22/Base.bmp”))) {
    glGenTextures(3, texture); // Create Three Textures

    // Create Nearest Filtered Texture
    

@@ -270,7 +272,7 @@
}

// Load The Bumpmaps
  • if (Image=LoadBMP(“Data22/Bump.bmp”)) {
  • if ((Image=LoadBMP(“Data22/Bump.bmp”))) {
    glPixelTransferf(GL_RED_SCALE,0.5f); // Scale RGB By 50%, So That We Have Only
    glPixelTransferf(GL_GREEN_SCALE,0.5f); // Half Intenstity
    glPixelTransferf(GL_BLUE_SCALE,0.5f);
    @@ -332,7 +334,7 @@
    }

    // Load The Logo-Bitmaps

  • if (Image=LoadBMP(“Data22/opengl_alpha.bmp”)) {
  • if ((Image=LoadBMP(“Data22/opengl_alpha.bmp”))) {
    char alpha[4Image->wImage->h]; // Create Memory For RGBA8-Texture
    int a;
    for (a=0; aw*Image->h; a++)
    @@ -359,7 +361,7 @@
    }

    // Load The “Extension Enabled”-Logo

  • if (Image=LoadBMP(“Data22/multi_on_alpha.bmp”)) {
  • if ((Image=LoadBMP(“Data22/multi_on_alpha.bmp”))) {
    char alpha[4Image->wImage->h]; // Create Memory For RGBA8-Texture
    int a;
    for (a=0; aw*Image->h; a++)
    @@ -960,7 +962,7 @@
    return TRUE; // Success
    }

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson23.c OpenGL-intro-1.1.1-fixed/lesson23.c
— OpenGL-intro-1.1.1/lesson23.c Sun Apr 29 00:27:17 2001
+++ OpenGL-intro-1.1.1-fixed/lesson23.c Sat Jan 19 02:49:45 2002
@@ -20,6 +20,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -103,7 +105,7 @@
for (vert = 0; vert < 3; vert++)
{
readstr(filein,oneline);

  •   	sscanf(oneline, "%f %f %f %f %f %f %f", &x, &y, &z, &u, &v);
    
  •   	sscanf(oneline, "%f %f %f %f %f", &x, &y, &z, &u, &v);
      	sector1.triangle[loop].vertex[vert].x = x;
      	sector1.triangle[loop].vertex[vert].y = y;
      	sector1.triangle[loop].vertex[vert].z = z;
    

@@ -316,7 +318,7 @@
return TRUE; // Success
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop
float start;
@@ -371,7 +373,7 @@

	SDL_GetRelativeMouseState(&x, &y);				// Get The Current Mouse Position	( Add )
  •   heading += (float)x/100 * 5;         // Update The Direction For Movement		( Add )
    
  •   heading -= (float)x/100 * 5;         // Update The Direction For Movement		( Add )
      yrot = heading;                                   // Update The Y Rotation	( Add )
      lookupdown -= (float)y/100 * 5;      // Update The X Rotation	( Add )
    

diff -u OpenGL-intro-1.1.1/lesson24.c OpenGL-intro-1.1.1-fixed/lesson24.c
— OpenGL-intro-1.1.1/lesson24.c Sun Apr 29 00:27:34 2001
+++ OpenGL-intro-1.1.1-fixed/lesson24.c Sat Jan 19 02:45:01 2002
@@ -20,6 +20,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -322,7 +324,7 @@
return TRUE; // Success
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson25.c OpenGL-intro-1.1.1-fixed/lesson25.c
— OpenGL-intro-1.1.1/lesson25.c Sun Apr 29 00:27:42 2001
+++ OpenGL-intro-1.1.1-fixed/lesson25.c Sat Jan 19 02:44:47 2002
@@ -21,6 +21,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -325,7 +327,7 @@
return TRUE; // Success
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson26.c OpenGL-intro-1.1.1-fixed/lesson26.c
— OpenGL-intro-1.1.1/lesson26.c Sun Apr 29 00:27:49 2001
+++ OpenGL-intro-1.1.1-fixed/lesson26.c Sat Jan 19 02:44:22 2002
@@ -19,6 +19,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -241,7 +243,7 @@
return TRUE; // Success
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson27.c OpenGL-intro-1.1.1-fixed/lesson27.c
— OpenGL-intro-1.1.1/lesson27.c Sun Apr 29 00:27:57 2001
+++ OpenGL-intro-1.1.1-fixed/lesson27.c Sat Jan 19 02:44:02 2002
@@ -23,6 +23,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -319,7 +321,7 @@
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson28.c OpenGL-intro-1.1.1-fixed/lesson28.c
— OpenGL-intro-1.1.1/lesson28.c Sun Apr 29 00:28:06 2001
+++ OpenGL-intro-1.1.1-fixed/lesson28.c Sat Jan 19 02:43:44 2002
@@ -26,6 +26,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -674,7 +676,7 @@
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson29.c OpenGL-intro-1.1.1-fixed/lesson29.c
— OpenGL-intro-1.1.1/lesson29.c Sun Apr 29 00:28:13 2001
+++ OpenGL-intro-1.1.1-fixed/lesson29.c Sat Jan 19 02:42:39 2002
@@ -20,6 +20,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -346,7 +348,7 @@
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop

diff -u OpenGL-intro-1.1.1/lesson30.c OpenGL-intro-1.1.1-fixed/lesson30.c
— OpenGL-intro-1.1.1/lesson30.c Sun Apr 29 00:28:21 2001
+++ OpenGL-intro-1.1.1-fixed/lesson30.c Sat Jan 19 02:42:06 2002
@@ -35,6 +35,8 @@
#endif
#include “SDL.h”

+#include <stdlib.h>
+
#define BOOL int
#define FALSE 0
#define TRUE 1
@@ -336,7 +338,7 @@
return TRUE; // Success
}

-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
BOOL done=FALSE; // Bool Variable To Exit Loop