[Bf-committers] my first little patch

Ton Roosendaal bf-committers@blender.org
Sat, 9 Aug 2003 13:00:13 +0200


Hi,

iostream has given us major headaches in the past, especially for cross =20=

platform development. If you choose to use only one OS, it's much easer =20=

to adopt to new 'standards' (which are not really standard, but =20
attempts to...).

http://www.cplusplus.com/doc/ansi/hfiles.html

Here you can read the official statement on this. Most important quote:

"Nevertheless for compatibility with ANSI-C, the use of name.h way to =20=

include C header files is allowed"

Which is something we can happily stick to!
If MSVC 7.1 doesn't support that backwards compatiblity feature, we're =20=

in troubles... is that really true?

-Ton-


On Friday, Aug 8, 2003, at 23:45 Europe/Amsterdam, Engel Sanchez wrote:

> Hi, everybody. I'd like somebody to check this simple patch that =20
> basically changes all the
>
> #include <iostream.h>
>
> =A0to
>
> #include <iostream>
>
> Which is what the C++ standard defines (<iostream.h> is a transitional =
=20
> syntax that many compilers still support). Simple, right? :)
>
> This is one of the few things I had to change in the code to get it to =
=20
> compile in MS Visual C++ 7.1. More to come. I like taking baby steps. =20=

> Hopefully I'll be able to contribute more meaningful things soon :) =20=

> Let me know if there's a better way to submit these patches.
>
> Here it is, and also as an attachment:
>
> Index: source/blender/render/intern/include/RE_ShadowBuffer.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: =20
> /cvsroot/bf-blender/blender/source/blender/render/intern/include/=20
> RE_ShadowBuffer.h,v
> retrieving revision 1.5
> diff -u -r1.5 RE_ShadowBuffer.h
> --- source/blender/render/intern/include/RE_ShadowBuffer.h=A027 Dec =
2002 =20
> 13:10:33 -0000=A01.5
> +++ source/blender/render/intern/include/RE_ShadowBuffer.h=A08 Aug =
2003 =20
> 15:12:56 -0000
> @@ -33,7 +33,7 @@
> =A0#ifndef RE_SHADOWBUFFER_H
> =A0#define RE_SHADOWBUFFER_H
> =A0
> -#include <iostream.h>
> +#include <iostream>
> =A0
> =A0struct ShadBuf;
> =A0struct LampRen;
> Index: source/gameengine/GameLogic/SCA_IInputDevice.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: =20
> /cvsroot/bf-blender/blender/source/gameengine/GameLogic/=20
> SCA_IInputDevice.cpp,v
> retrieving revision 1.3
> diff -u -r1.3 SCA_IInputDevice.cpp
> --- source/gameengine/GameLogic/SCA_IInputDevice.cpp=A025 Nov 2002 =20
> 15:29:42 -0000=A01.3
> +++ source/gameengine/GameLogic/SCA_IInputDevice.cpp=A08 Aug 2003 =20
> 15:12:57 -0000
> @@ -29,7 +29,7 @@
> =A0 * ***** END GPL/BL DUAL LICENSE BLOCK *****
> =A0 */
> =A0
> -#include <iostream.h>
> +#include <iostream>
> =A0#include "SCA_IInputDevice.h"
> =A0
> =A0#ifdef HAVE_CONFIG_H
> Index: source/gameengine/GameLogic/SCA_KeyboardManager.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: =20
> /cvsroot/bf-blender/blender/source/gameengine/GameLogic/=20
> SCA_KeyboardManager.cpp,v
> retrieving revision 1.3
> diff -u -r1.3 SCA_KeyboardManager.cpp
> --- source/gameengine/GameLogic/SCA_KeyboardManager.cpp=A025 Nov 2002 =20=

> 15:29:42 -0000=A01.3
> +++ source/gameengine/GameLogic/SCA_KeyboardManager.cpp=A08 Aug 2003 =20=

> 15:12:57 -0000
> @@ -32,7 +32,7 @@
> =A0 * ***** END GPL/BL DUAL LICE NSE BLOCK *****
> =A0 */
> =A0
> -#include <iostream.h>
> +#include <iostream>
> =A0#include "BoolValue.h"
> =A0#include "SCA_KeyboardManager.h"
> =A0#include "SCA_KeyboardSensor.h"
> Index: source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: =20
> /cvsroot/bf-blender/blender/source/gameengine/GamePlayer/common/=20
> GPC_KeyboardDevice.cpp,v
> retrieving revision 1.3
> diff -u -r1.3 GPC_KeyboardDevice.cpp
> --- source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp=A025 =
Nov =20
> 2002 15:29:45 -0000=A01.3
> +++ source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp=A08 Aug =
=20
> 2003 15:12:57 -0000
> @@ -30,7 +30,7 @@
> =A0 * ***** END GPL/BL DUAL LICENSE BLOCK *****
> =A0 */
> =A0
> -#include <iostream.h>
> +#include <iostream>
> =A0#include "GPC_KeyboardDevice.h"
> =A0
> =A0#ifdef HAVE_CONFIG_H
>
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
>
>
------------------------------------------------------------------------=20=

--
Ton Roosendaal  Blender Foundation ton@blender.org =20
http://www.blender.org