[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-commit] gnash ChangeLog server/types.h libbase/test_ogl...
From: |
zou lunkai |
Subject: |
Re: [Gnash-commit] gnash ChangeLog server/types.h libbase/test_ogl... |
Date: |
Thu, 5 Jun 2008 09:18:56 +0800 |
> * server/types.h: __TYPES_H__ is a likely candidate for a name
> conflict (using a double underscore in an identifier is
> undefined
> behaviour). Make macros into inlines for better compile time
> checking, and so that the compiler (which knows best) can
> decide what to do with them.
__TYPES_H__ is just a name for the preprocessor, isn't it? Compiler
shouldn't have a chance to meet this 'name'.
--zou
On 6/5/08, Benjamin Wolsey <address@hidden> wrote:
> CVSROOT: /sources/gnash
> Module name: gnash
> Changes by: Benjamin Wolsey <bwy> 08/06/04 22:41:13
>
> Modified files:
> . : ChangeLog
> server : types.h
> Removed files:
> libbase : test_ogl.cpp
>
> Log message:
> * libbase/test_ogl.cpp: make your own if you want to test OGL
> (dropped).
> * server/types.h: __TYPES_H__ is a likely candidate for a name
> conflict (using a double underscore in an identifier is
> undefined
> behaviour). Make macros into inlines for better compile time
> checking, and so that the compiler (which knows best) can
> decide what to do with them.
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6822&r2=1.6823
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/types.h?cvsroot=gnash&r1=1.22&r2=1.23
> http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/test_ogl.cpp?cvsroot=gnash&r1=1.4&r2=0
>
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.6822
> retrieving revision 1.6823
> diff -u -b -r1.6822 -r1.6823
> --- ChangeLog 4 Jun 2008 20:14:40 -0000 1.6822
> +++ ChangeLog 4 Jun 2008 22:41:12 -0000 1.6823
> @@ -1,3 +1,13 @@
> +2008-06-04 Benjamin Wolsey <address@hidden>
> +
> + * libbase/test_ogl.cpp: make your own if you want to test OGL
> + (dropped).
> + * server/types.h: __TYPES_H__ is a likely candidate for a name
> + conflict (using a double underscore in an identifier is undefined
> + behaviour). Make macros into inlines for better compile time
> + checking, and so that the compiler (which knows best) can
> + decide what to do with them.
> +
> 2008-06-04 Sandro Santilli <address@hidden>
>
> * libmedia/ffmpeg/MediaParserFfmpeg.{cpp,h}:
>
> Index: server/types.h
> ===================================================================
> RCS file: /sources/gnash/gnash/server/types.h,v
> retrieving revision 1.22
> retrieving revision 1.23
> diff -u -b -r1.22 -r1.23
> --- server/types.h 16 Apr 2008 21:05:26 -0000 1.22
> +++ server/types.h 4 Jun 2008 22:41:13 -0000 1.23
> @@ -5,15 +5,14 @@
>
> // Some basic types.
>
> -#ifndef __TYPES_H__
> -#define __TYPES_H__
> +#ifndef GNASH_TYPES_H
> +#define GNASH_TYPES_H
>
> #include <string>
> #include <boost/cstdint.hpp> // for boost::?int??_t
>
> -#define TWIPS_TO_PIXELS(x) ((x) / 20.0)
> -#define PIXELS_TO_TWIPS(x) ((x) * 20)
> -
> +inline double TWIPS_TO_PIXELS(int i) { return i / 20.0; }
> +inline int PIXELS_TO_TWIPS(double d) { return d * 20; }
>
> namespace gnash {
> class stream; // forward declaration
> @@ -137,7 +136,7 @@
> } // end namespace gnash
>
>
> -#endif // __TYPES_H__
> +#endif // GNASH_TYPES_H
>
>
> // Local Variables:
>
> Index: libbase/test_ogl.cpp
> ===================================================================
> RCS file: libbase/test_ogl.cpp
> diff -N libbase/test_ogl.cpp
> --- libbase/test_ogl.cpp 28 Aug 2006 11:07:14 -0000 1.4
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,42 +0,0 @@
> -// ogl.cpp -- by Thatcher Ulrich <address@hidden>
> -
> -// This source code has been donated to the Public Domain. Do
> -// whatever you want with it.
> -
> -// test program for ogl wrapper
> -
> -
> -#include <cstdlib> //For exit()
> -#include "ogl.h"
> -#include <SDL.h>
> -
> -
> -#undef main // SDL weirdness under WIN32!!
> -extern "C" int main(int argc, char *argv[])
> -{
> - if (SDL_Init(SDL_INIT_VIDEO /* | SDL_INIT_JOYSTICK | SDL_INIT_CDROM |
> SDL_INIT_AUDIO*/))
> - {
> - fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
> - exit(1);
> - }
> - atexit(SDL_Quit);
> -
> - int bpp = 24;
> - int flags = SDL_OPENGL | (0 ? SDL_FULLSCREEN : 0);
> -
> - SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
> - SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
> - SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
> - SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
> - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
> -
> - // Set the video mode.
> - if (SDL_SetVideoMode(320, 240, bpp, flags) == 0) {
> - fprintf(stderr, "SDL_SetVideoMode() failed.");
> - exit(1);
> - }
> -
> - ogl::open();
> -
> - return 0;
> -}
>
>
> _______________________________________________
> Gnash-commit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-commit
>