[ODE] [patch] // comments in headers

Martin C. Martin martin at metahuman.org
Sat Aug 2 09:04:02 2003


Well odecpp.h and odecpp_collision.h are the C++ wrappers, so they're
about as far from pure-C headers as you can get.  But I've made the change
to common.h and committed it to CVS.

- Martin

"Adam D. Moss" wrote:
> 
> Hello.
> 
> Some of ODE's headers use C++-style comments in pure-C headers
> or parts of the headers that aren't protected by #ifdef __cplusplus.
> 
> This can lead to noisy warnings or, at worst, compilation failure
> when using the ODE C API from a C program compiled with a C compiler.
> 
> Here's a patch that fixes this.
> 
> --Adam
> --
> Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
> 'Fox News and all the other right-wing pundits thrive by assuring their
> audiences that they are the real unfortunates, oppressed by problems as
> varied as big government, liberal media, taxes and the bottom-feeders
> they serve, car-pool lanes, and France.'
> 
>   --------------------------------------------------------------------------
> ? cheaders.patch
> ? odeopsp.diff
> ? include/ode/config.h
> ? ode/doc/ode.html
> Index: include/ode/common.h
> ===================================================================
> RCS file: /cvsroot/opende/ode/include/ode/common.h,v
> retrieving revision 1.30
> diff -u -r1.30 common.h
> --- include/ode/common.h        11 Nov 2002 00:11:05 -0000      1.30
> +++ include/ode/common.h        2 Aug 2003 15:21:37 -0000
> @@ -292,10 +292,10 @@
>  /* joint force feedback information */
> 
>  typedef struct dJointFeedback {
> -  dVector3 f1;         // force applied to body 1
> -  dVector3 t1;         // torque applied to body 1
> -  dVector3 f2;         // force applied to body 2
> -  dVector3 t2;         // torque applied to body 2
> +  dVector3 f1;         /* force applied to body 1  */
> +  dVector3 t1;         /* torque applied to body 1 */
> +  dVector3 f2;         /* force applied to body 2  */
> +  dVector3 t2;         /* torque applied to body 2 */
>  } dJointFeedback;
> 
> 
> Index: include/ode/odecpp.h
> ===================================================================
> RCS file: /cvsroot/opende/ode/include/ode/odecpp.h,v
> retrieving revision 1.17
> diff -u -r1.17 odecpp.h
> --- include/ode/odecpp.h        29 Jul 2003 14:00:03 -0000      1.17
> +++ include/ode/odecpp.h        2 Aug 2003 15:21:37 -0000
> @@ -20,7 +20,7 @@
>   *                                                                      *
>   *************************************************************************/
> 
> -// C++ interface for non-collision stuff
> +/* C++ interface for non-collision stuff */
> 
> 
>  #ifndef _ODE_ODECPP_H_
> Index: include/ode/odecpp_collision.h
> ===================================================================
> RCS file: /cvsroot/opende/ode/include/ode/odecpp_collision.h,v
> retrieving revision 1.2
> diff -u -r1.2 odecpp_collision.h
> --- include/ode/odecpp_collision.h      23 Jun 2003 18:16:02 -0000      1.2
> +++ include/ode/odecpp_collision.h      2 Aug 2003 15:21:37 -0000
> @@ -20,7 +20,7 @@
>   *                                                                      *
>   *************************************************************************/
> 
> -// C++ interface for new collision API
> +/* C++ interface for new collision API */
> 
> 
>  #ifndef _ODE_ODECPP_COLLISION_H_