[Brlcad-commits] CVS: brlcad/include RtServerImpl.h,14.3,14.4 bn.h,14.7,14.8 brlregex.h,14.2,14.3 bu
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Sean M. <br...@us...> - 2005-05-08 05:28:15
|
Update of /cvsroot/brlcad/brlcad/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1711 Modified Files: RtServerImpl.h bn.h brlregex.h bu.h common.h compat4.h light.h optical.h raytrace.h regex.h rtgeom.h vmath.h wdb.h Log Message: consolidate the __cplusplus external declaration sections that protect C functions from C++ name mangling by using the same __BEGIN_DECLS and __END_DECLS macros in our headers (3rd party are mostly left alone). works indentation a little too. Index: RtServerImpl.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/RtServerImpl.h,v retrieving revision 14.3 retrieving revision 14.4 diff -w -u -r14.3 -r14.4 --- RtServerImpl.h 15 Dec 2004 17:56:52 -0000 14.3 +++ RtServerImpl.h 8 May 2005 05:27:57 -0000 14.4 @@ -13,15 +13,16 @@ #ifndef _Included_mil_army_arl_muves_rtserver_RtServerImpl #define _Included_mil_army_arl_muves_rtserver_RtServerImpl -#ifdef __cplusplus -extern "C" { -#endif + +__BEGIN_DECLS + #undef mil_army_arl_muves_rtserver_RtServerImpl_serialVersionUID #define mil_army_arl_muves_rtserver_RtServerImpl_serialVersionUID -3215090123894869218LL #undef mil_army_arl_muves_rtserver_RtServerImpl_serialVersionUID #define mil_army_arl_muves_rtserver_RtServerImpl_serialVersionUID -4100238210092549637LL #undef mil_army_arl_muves_rtserver_RtServerImpl_serialVersionUID #define mil_army_arl_muves_rtserver_RtServerImpl_serialVersionUID 4974527148936298033LL + /* * Class: mil_army_arl_muves_rtserver_RtServerImpl * Method: rtsInit @@ -160,9 +161,8 @@ JNIEXPORT jobject JNICALL Java_mil_army_arl_services_RtService_getBoundingBox (JNIEnv *, jobject, jint); -#ifdef __cplusplus -} -#endif +__END_DECLS + #endif /* Index: bn.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/bn.h,v retrieving revision 14.7 retrieving revision 14.8 diff -w -u -r14.7 -r14.8 --- bn.h 4 May 2005 04:05:59 -0000 14.7 +++ bn.h 8 May 2005 05:27:57 -0000 14.8 @@ -63,11 +63,10 @@ * $Header$ */ -#ifndef SEEN_BN_H -#define SEEN_BN_H seen -#ifdef __cplusplus -extern "C" { -#endif +#ifndef __BN_H__ +#define __BN_H__ + +__BEGIN_DECLS #ifndef BN_EXPORT #if defined(WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL) @@ -1752,9 +1751,8 @@ BN_EXPORT extern const char bn_version[]; /*----------------------------------------------------------------------*/ -#ifdef __cplusplus -} -#endif +__END_DECLS + #endif /* SEEN_BN_H */ /* Index: brlregex.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/brlregex.h,v retrieving revision 14.2 retrieving revision 14.3 diff -w -u -r14.2 -r14.3 --- brlregex.h 24 Mar 2005 16:27:07 -0000 14.2 +++ brlregex.h 8 May 2005 05:27:57 -0000 14.3 @@ -65,13 +65,6 @@ # define const /**/ # endif #endif -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif /* types */ Index: bu.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/bu.h,v retrieving revision 14.9 retrieving revision 14.10 diff -w -u -r14.9 -r14.10 --- bu.h 11 Apr 2005 18:32:26 -0000 14.9 +++ bu.h 8 May 2005 05:27:57 -0000 14.10 @@ -64,9 +64,7 @@ /* Included for Tcl_Interp definition */ #include "tcl.h" -#ifdef __cplusplus -extern "C" { -#endif +__BEGIN_DECLS #ifndef BU_EXPORT #if defined(WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL) @@ -2509,10 +2507,8 @@ BU_EXPORT BU_EXTERN(struct bu_hash_entry *bu_hash_tbl_next, (struct bu_hash_record *rec)); +__END_DECLS -#ifdef __cplusplus -} -#endif #endif /* SEEN_BU_H */ /* Index: common.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/common.h,v retrieving revision 14.6 retrieving revision 14.7 diff -w -u -r14.6 -r14.7 --- common.h 3 May 2005 05:18:29 -0000 14.6 +++ common.h 8 May 2005 05:27:57 -0000 14.7 @@ -42,6 +42,8 @@ #ifndef __COMMON_H__ #define __COMMON_H__ +/* include the venerable config.h file. use a pregenerated one for + * windows when we cannot autogenerate it easily. */ #ifdef __win32 # ifdef HAVE_CONFIG_H # include "config_win.h" @@ -56,6 +58,15 @@ # endif #endif /* __win32 */ +/* provide declaration markers for header externals */ +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS +# define __END_DECLS +#endif + #endif /* __COMMON_H__ */ /* Index: compat4.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/compat4.h,v retrieving revision 14.4 retrieving revision 14.5 diff -w -u -r14.4 -r14.5 --- compat4.h 30 Jan 2005 20:30:10 -0000 14.4 +++ compat4.h 8 May 2005 05:27:57 -0000 14.5 @@ -38,9 +38,8 @@ #ifndef SEEN_COMPAT4_H #define SEEN_COMPAT4_H seen -#ifdef __cplusplus -extern "C" { -#endif + +__BEGIN_DECLS /* raytrace.h macro replacements */ #define GETSTRUCT BU_GETSTRUCT @@ -470,9 +469,8 @@ #define rt_vlist_2string( vhead, string, x, y, scale, theta ) \ bn_vlist_2string( vhead, &rt_g.rtg_vlfree, string, x, y, scale, theta ) -#ifdef __cplusplus -} -#endif +__END_DECLS + #endif /* SEEN_COMPAT4_H */ #endif /* DONT_USE_COMPAT4_H */ Index: light.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/light.h,v retrieving revision 14.5 retrieving revision 14.6 diff -w -u -r14.5 -r14.6 --- light.h 28 Mar 2005 06:31:27 -0000 14.5 +++ light.h 8 May 2005 05:27:57 -0000 14.6 @@ -33,9 +33,9 @@ #ifndef SEEN_LIGHT_H #define SEEN_LIGHT_H seen -#ifdef __cplusplus -extern "C" { -#endif +#include "common.h" + +__BEGIN_DECLS struct light_pt { point_t lp_pt; @@ -90,9 +90,8 @@ struct shadework *swp, int have)); -#ifdef __cplusplus -} -#endif +__END_DECLS + #endif /* SEEN_LIGHT_H */ /* Index: optical.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/optical.h,v retrieving revision 14.2 retrieving revision 14.3 diff -w -u -r14.2 -r14.3 --- optical.h 28 Mar 2005 15:39:27 -0000 14.2 +++ optical.h 8 May 2005 05:27:57 -0000 14.3 @@ -27,13 +27,13 @@ #ifndef SEEN_OPTICAL_H #define SEEN_OPTICAL_H seen +#include "common.h" + #include "bu.h" #include "shadefuncs.h" #include "shadework.h" -#ifdef __cplusplus -extern "C" { -#endif +__BEGIN_DECLS #ifndef OPTICAL_EXPORT # if defined(WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL) @@ -208,9 +208,8 @@ char ff_color[3]; }; -#ifdef __cplusplus -} -#endif +__END_DECLS + #endif /* SEEN_OPTICAL_H */ /* Index: raytrace.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/raytrace.h,v retrieving revision 14.11 retrieving revision 14.12 diff -w -u -r14.11 -r14.12 --- raytrace.h 29 Apr 2005 14:22:52 -0000 14.11 +++ raytrace.h 8 May 2005 05:27:58 -0000 14.12 @@ -75,9 +75,7 @@ #include "nmg.h" #endif -#ifdef __cplusplus -extern "C" { -#endif +__BEGIN_DECLS #ifndef RT_EXPORT #if defined(WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL) @@ -6736,7 +6734,7 @@ int (*func)())); /* defined in binary_obj.c */ -RT_EXPORT BU_EXTERN(int mk_binunif, +RT_EXPORT BU_EXTERN(int rt_mk_binunif, (struct rt_wdb *wdbp, const char *obj_name, const char *file_name, @@ -6777,9 +6775,7 @@ /* vers.c (created by librt/Cakefile) */ RT_EXPORT extern const char rt_version[]; -#ifdef __cplusplus -} -#endif +__END_DECLS #endif /* RAYTRACE_H */ Index: regex.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/regex.h,v retrieving revision 14.2 retrieving revision 14.3 diff -w -u -r14.2 -r14.3 --- regex.h 24 Mar 2005 16:42:29 -0000 14.2 +++ regex.h 8 May 2005 05:27:59 -0000 14.3 @@ -56,15 +56,6 @@ # endif #endif - -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - #include <sys/types.h> /* types */ Index: rtgeom.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/rtgeom.h,v retrieving revision 14.4 retrieving revision 14.5 diff -w -u -r14.4 -r14.5 --- rtgeom.h 30 Jan 2005 20:30:11 -0000 14.4 +++ rtgeom.h 8 May 2005 05:27:59 -0000 14.5 @@ -54,9 +54,9 @@ #ifndef SEEN_RTGEOM_H #define SEEN_RTGEOM_H seen -#ifdef __cplusplus -extern "C" { -#endif +#include "common.h" + +__BEGIN_DECLS #undef r_a /* defined on alliant in <machine/reg.h> included in signal.h */ @@ -549,10 +549,7 @@ #define RT_BOT_INTERNAL_MAGIC 0x626F7472 /* botr */ #define RT_BOT_CK_MAGIC(_p) BU_CKMAG(_p,RT_BOT_INTERNAL_MAGIC,"rt_bot_internal") - -#ifdef __cplusplus -} -#endif +__END_DECLS #endif /* SEEN_RTGEOM_H */ Index: vmath.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/vmath.h,v retrieving revision 14.5 retrieving revision 14.6 diff -w -u -r14.5 -r14.6 --- vmath.h 1 May 2005 23:15:12 -0000 14.5 +++ vmath.h 8 May 2005 05:27:59 -0000 14.6 @@ -81,9 +81,9 @@ #ifndef VMATH_H #define VMATH_H seen -#ifdef __cplusplus -extern "C" { -#endif +#include "common.h" + +__BEGIN_DECLS #ifndef M_PI @@ -1147,9 +1147,7 @@ (_lo1)[Y] >= (_lo2)[Y] && (_hi1)[Y] <= (_hi2)[Y] && \ (_lo1)[Z] >= (_lo2)[Z] && (_hi1)[Z] <= (_hi2)[Z] ) -#ifdef __cplusplus -} -#endif +__END_DECLS #endif /* VMATH_H */ Index: wdb.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/include/wdb.h,v retrieving revision 14.6 retrieving revision 14.7 diff -w -u -r14.6 -r14.7 --- wdb.h 8 May 2005 04:56:18 -0000 14.6 +++ wdb.h 8 May 2005 05:28:00 -0000 14.7 @@ -71,9 +71,7 @@ #ifndef WDB_H #define WDB_H seen -#ifdef __cplusplus -extern "C" { -#endif +__BEGIN_DECLS #ifndef WDB_EXPORT # if defined(WIN32) && !defined(__CYGWIN__) && defined(BRLCAD_DLL) @@ -451,9 +449,7 @@ struct bu_ptbl *regions ) ); -#ifdef __cplusplus -} -#endif +__END_DECLS #endif /* WDB_H */ |