[ODE] [patch] // comments in headers

Adam D. Moss aspirin at ntlworld.com
Sat Aug 2 08:25:02 2003


This is a multi-part message in MIME format.
--------------090208070209030106000206
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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.'

--------------090208070209030106000206
Content-Type: text/plain;
 name="cheaders.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="cheaders.patch"

? 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_

--------------090208070209030106000206--