From e5efd5bf69dac696b489d504cdde8ebd413641b2 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 21 Apr 1998 17:03:45 +0000 Subject: [PATCH] Prepairing for C++ integration. --- Debug/fg_debug.c | 17 +++++++++++++---- Debug/fg_debug.h | 12 ++++++++++++ Math/Makefile.am | 1 + Math/Makefile.in | 7 ++++--- Math/fg_geodesy.h | 19 +++++++++++++++++-- Math/fg_random.h | 17 +++++++++++++++-- Math/mat3.h | 8 ++++++++ Math/mat3defs.h | 17 +++++++++++++++++ Math/mat3err.h | 15 +++++++++++++++ Math/polar.h | 19 ++++++++++++++++--- Math/vector.h | 17 +++++++++++++++-- XGL/xgl.h | 11 +++++++++++ zlib/Makefile.am | 4 ++++ zlib/Makefile.in | 4 ++++ 14 files changed, 152 insertions(+), 16 deletions(-) diff --git a/Debug/fg_debug.c b/Debug/fg_debug.c index dcbd98da1..f47b0251e 100644 --- a/Debug/fg_debug.c +++ b/Debug/fg_debug.c @@ -87,10 +87,12 @@ void fgInitDebug( void ) { // Support for log file/alt debug output via command line, environment or // reasonable default. + /* if( strlen( logArgbuf ) > 3) { // First check for command line option // Assumed that we will append. fg_DebugOutput = fopen(logArgbuf, "a+" ); } + */ if( !fg_DebugOutput ) { // If not set on command line, environment? pszFile = getenv( "FG_DEBUGFILE" ); @@ -110,9 +112,11 @@ void fgInitDebug( void ) { // is in range (properly optioned) the we will override both defaults // and the environmental value. + /* if ((priorityArgValue >= FG_BULK) && (priorityArgValue <= FG_ABORT)) { fg_DebugPriority = priorityArgValue; } else { // Either not set or out of range. We will not warn the user. + */ pszPrio = getenv( "FG_DEBUGPRIORITY" ); if( pszPrio ) { fg_DebugPriority = atoi( pszPrio ); @@ -120,12 +124,14 @@ void fgInitDebug( void ) { "fg_debug.c: Environment overrides default debug priority (%d)\n", fg_DebugPriority ); } - } + /* } */ + /* if ((debugArgValue >= FG_ALL) && (debugArgValue < FG_UNDEFD)) { fg_DebugPriority = priorityArgValue; } else { // Either not set or out of range. We will not warn the user. + */ pszClass = getenv( "FG_DEBUGCLASS" ); if( pszClass ) { fg_DebugClass = fgDebugStrToClass( pszClass ); @@ -133,7 +139,7 @@ void fgInitDebug( void ) { "fg_debug.c: Environment overrides default debug class (0x%08X)\n", fg_DebugClass ); } - } + /* } */ FG_RELEASEDEBUGSEM; } @@ -266,9 +272,12 @@ int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... ) { /* $Log$ -/* Revision 1.1 1998/04/18 03:52:04 curt -/* Moved to Lib directory and created a libDebug. +/* Revision 1.2 1998/04/21 17:03:45 curt +/* Prepairing for C++ integration. /* + * Revision 1.1 1998/04/18 03:52:04 curt + * Moved to Lib directory and created a libDebug. + * * Revision 1.10 1998/03/14 00:31:21 curt * Beginning initial terrain texturing experiments. * diff --git a/Debug/fg_debug.h b/Debug/fg_debug.h index aa3b44117..51e75b14d 100644 --- a/Debug/fg_debug.h +++ b/Debug/fg_debug.h @@ -27,6 +27,12 @@ #ifndef _FG_DEBUG_H #define _FG_DEBUG_H + +#ifdef __cplusplus +extern "C" { +#endif + + #include /* NB: To add a dbg_class, add it here, and add it to the structure in @@ -139,5 +145,11 @@ extern fgDebugPriority fg_DebugPriority; extern FILE * fg_DebugOutput; + +#ifdef __cplusplus +} +#endif + + #endif /* _FG_DEBUG_H */ diff --git a/Math/Makefile.am b/Math/Makefile.am index ae8687a58..5518161f8 100644 --- a/Math/Makefile.am +++ b/Math/Makefile.am @@ -8,6 +8,7 @@ libMath_la_SOURCES = \ MAT3vec.c \ fg_geodesy.c fg_geodesy.h \ fg_random.c fg_random.h \ + interpolater.c interpolater.h \ mat3.h mat3defs.h mat3err.h \ polar.c polar.h \ vector.c vector.h diff --git a/Math/Makefile.in b/Math/Makefile.in index 9772a2f9a..c838ac7fc 100644 --- a/Math/Makefile.in +++ b/Math/Makefile.in @@ -80,6 +80,7 @@ libMath_la_SOURCES = \ MAT3vec.c \ fg_geodesy.c fg_geodesy.h \ fg_random.c fg_random.h \ + interpolater.c interpolater.h \ mat3.h mat3defs.h mat3err.h \ polar.c polar.h \ vector.c vector.h @@ -100,7 +101,7 @@ X_PRE_LIBS = @X_PRE_LIBS@ libMath_la_LDFLAGS = libMath_la_LIBADD = libMath_la_OBJECTS = MAT3geom.lo MAT3inv.lo MAT3mat.lo MAT3vec.lo \ -fg_geodesy.lo fg_random.lo polar.lo vector.lo +fg_geodesy.lo fg_random.lo interpolater.lo polar.lo vector.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @@ -113,8 +114,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP = --best DEP_FILES = .deps/MAT3geom.P .deps/MAT3inv.P .deps/MAT3mat.P \ -.deps/MAT3vec.P .deps/fg_geodesy.P .deps/fg_random.P .deps/polar.P \ -.deps/vector.P +.deps/MAT3vec.P .deps/fg_geodesy.P .deps/fg_random.P \ +.deps/interpolater.P .deps/polar.P .deps/vector.P SOURCES = $(libMath_la_SOURCES) OBJECTS = $(libMath_la_OBJECTS) diff --git a/Math/fg_geodesy.h b/Math/fg_geodesy.h index 65770e468..a464516da 100644 --- a/Math/fg_geodesy.h +++ b/Math/fg_geodesy.h @@ -15,6 +15,11 @@ #define _FG_GEODESY_H +#ifdef __cplusplus +extern "C" { +#endif + + /* fgGeocToGeod(lat_geoc, radius, *lat_geod, *alt, *sea_level_r) * INPUTS: * lat_geoc Geocentric latitude, radians, + = North @@ -89,6 +94,9 @@ void fgGeodToGeoc( double lat_geod, double alt, double *sl_radius, $Header$ $Log$ +Revision 1.3 1998/04/21 17:03:48 curt +Prepairing for C++ integration. + Revision 1.2 1998/01/22 02:59:38 curt Changed #ifdef FILE_H to #ifdef _FILE_H @@ -144,13 +152,20 @@ Initial Flight Gear revision. --------------------------------------------------------------------------*/ +#ifdef __cplusplus +} +#endif + #endif /* _FG_GEODESY_H */ /* $Log$ -/* Revision 1.2 1998/01/22 02:59:38 curt -/* Changed #ifdef FILE_H to #ifdef _FILE_H +/* Revision 1.3 1998/04/21 17:03:48 curt +/* Prepairing for C++ integration. /* + * Revision 1.2 1998/01/22 02:59:38 curt + * Changed #ifdef FILE_H to #ifdef _FILE_H + * * Revision 1.1 1997/07/31 23:13:14 curt * Initial revision. * diff --git a/Math/fg_random.h b/Math/fg_random.h index 2b8ec8dae..845a7f369 100644 --- a/Math/fg_random.h +++ b/Math/fg_random.h @@ -28,6 +28,11 @@ #define _FG_RANDOM_H +#ifdef __cplusplus +extern "C" { +#endif + + /* Seed the random number generater with time() so we don't see the * same sequence every time */ void fg_srandom(void); @@ -36,13 +41,21 @@ void fg_srandom(void); double fg_random(void); +#ifdef __cplusplus +} +#endif + + #endif /* _FG_RANDOM_H */ /* $Log$ -/* Revision 1.2 1998/01/22 02:59:38 curt -/* Changed #ifdef FILE_H to #ifdef _FILE_H +/* Revision 1.3 1998/04/21 17:03:48 curt +/* Prepairing for C++ integration. /* + * Revision 1.2 1998/01/22 02:59:38 curt + * Changed #ifdef FILE_H to #ifdef _FILE_H + * * Revision 1.1 1997/07/30 16:04:09 curt * Moved random routines from Utils/ to Math/ * diff --git a/Math/mat3.h b/Math/mat3.h index 58c4b9e07..dd4e67db8 100644 --- a/Math/mat3.h +++ b/Math/mat3.h @@ -7,6 +7,10 @@ #ifndef MAT3_HAS_BEEN_INCLUDED #define MAT3_HAS_BEEN_INCLUDED +#ifdef __cplusplus +extern "C" { +#endif + /* ----------------------------- Constants ------------------------------ */ /* @@ -143,5 +147,9 @@ int MAT3mult_hvec (MAT3hvec result_vec, MAT3hvec vec, MAT3mat mat, int normaliz void MAT3cross_product(MAT3vec result,MAT3vec,MAT3vec); void MAT3perp_vec(MAT3vec result_vec, MAT3vec vec, int is_unit); +#ifdef __cplusplus +} +#endif + #endif /* MAT3_HAS_BEEN_INCLUDED */ diff --git a/Math/mat3defs.h b/Math/mat3defs.h index 369ce25d8..dd4ceeb5e 100644 --- a/Math/mat3defs.h +++ b/Math/mat3defs.h @@ -1,5 +1,14 @@ /* Copyright 1988, Brown Computer Graphics Group. All Rights Reserved. */ + +#ifndef _MAT3DEFS_H +#define _MAT3DEFS_H + + +#ifdef __cplusplus +extern "C" { +#endif + #include /* #include */ #include @@ -37,3 +46,11 @@ /* ------------------------- Global Variables ---------------------------- */ /* extern ERRid *MAT3_errid; */ + + +#ifdef __cplusplus +} +#endif + + +#endif /* _MAT3DEFS_H */ diff --git a/Math/mat3err.h b/Math/mat3err.h index d2c5e4f91..7ac5740ad 100644 --- a/Math/mat3err.h +++ b/Math/mat3err.h @@ -1,3 +1,12 @@ +#ifndef _MAT3ERR_H +#define _MAT3ERR_H + + +#ifdef __cplusplus +extern "C" { +#endif + + #include "sph_errtypes.h" #ifdef THINK_C @@ -24,3 +33,9 @@ typedef int ERRid; #define ERRregister_package(S) 100 +#ifdef __cplusplus +} +#endif + + +#endif /* _MAT3ERR_H */ diff --git a/Math/polar.h b/Math/polar.h index cc7ff3cdb..d85e2ac89 100644 --- a/Math/polar.h +++ b/Math/polar.h @@ -28,6 +28,11 @@ #define _POLAR_H +#ifdef __cplusplus +extern "C" { +#endif + + #include @@ -59,14 +64,22 @@ void fgRotateBatchInit(double Theta, double Phi); struct fgCartesianPoint fgRotateCartesianPoint(struct fgCartesianPoint p); +#ifdef __cplusplus +} +#endif + + #endif /* _POLAR_H */ /* $Log$ -/* Revision 1.7 1998/01/27 00:48:00 curt -/* Incorporated Paul Bleisch's new debug message -/* system and commandline/config file processing code. +/* Revision 1.8 1998/04/21 17:03:50 curt +/* Prepairing for C++ integration. /* + * Revision 1.7 1998/01/27 00:48:00 curt + * Incorporated Paul Bleisch's new debug message + * system and commandline/config file processing code. + * * Revision 1.6 1998/01/22 02:59:39 curt * Changed #ifdef FILE_H to #ifdef _FILE_H * diff --git a/Math/vector.h b/Math/vector.h index 06f78862a..097a21245 100644 --- a/Math/vector.h +++ b/Math/vector.h @@ -28,6 +28,11 @@ #define _VECTOR_H +#ifdef __cplusplus +extern "C" { +#endif + + #include @@ -36,13 +41,21 @@ void map_vec_onto_cur_surface_plane(MAT3vec normal, MAT3vec v0, MAT3vec vec, MAT3vec result); +#ifdef __cplusplus +} +#endif + + #endif /* _VECTOR_H */ /* $Log$ -/* Revision 1.3 1998/01/22 02:59:39 curt -/* Changed #ifdef FILE_H to #ifdef _FILE_H +/* Revision 1.4 1998/04/21 17:03:51 curt +/* Prepairing for C++ integration. /* + * Revision 1.3 1998/01/22 02:59:39 curt + * Changed #ifdef FILE_H to #ifdef _FILE_H + * * Revision 1.2 1998/01/19 19:27:14 curt * Merged in make system changes from Bob Kuehne * This should simplify things tremendously. diff --git a/XGL/xgl.h b/XGL/xgl.h index 9546127c6..a8f14ccfb 100644 --- a/XGL/xgl.h +++ b/XGL/xgl.h @@ -2,6 +2,11 @@ #define _XGL_H +#ifdef __cplusplus +extern "C" { +#endif + + #include #include #include @@ -826,4 +831,10 @@ void xglPrioritizeTexturesEXT ( GLsizei n, GLuint *textures, GLclampf *pri #endif + +#ifdef __cplusplus +} +#endif + + #endif /* _XGL_H */ diff --git a/zlib/Makefile.am b/zlib/Makefile.am index c60ef2843..29277c068 100644 --- a/zlib/Makefile.am +++ b/zlib/Makefile.am @@ -1,5 +1,8 @@ libdir = ${exec_prefix}/lib +EXTRA_DIST = ChangeLog INDEX Make_vms.com Makefile.riscos README \ + algorithm.txt descrip.mms example.c maketree.c minigzip.c zlib.3 + lib_LTLIBRARIES = libz.la libz_la_SOURCES = \ @@ -22,6 +25,7 @@ libz_la_SOURCES = \ infutil.c \ infutil.h \ trees.c \ + trees.h \ uncompr.c \ zconf.h \ zlib.h \ diff --git a/zlib/Makefile.in b/zlib/Makefile.in index 169c7eda6..b66baeeaa 100644 --- a/zlib/Makefile.in +++ b/zlib/Makefile.in @@ -72,6 +72,9 @@ VERSION = @VERSION@ libdir = ${exec_prefix}/lib +EXTRA_DIST = ChangeLog INDEX Make_vms.com Makefile.riscos README \ + algorithm.txt descrip.mms example.c maketree.c minigzip.c zlib.3 + lib_LTLIBRARIES = libz.la libz_la_SOURCES = \ @@ -94,6 +97,7 @@ libz_la_SOURCES = \ infutil.c \ infutil.h \ trees.c \ + trees.h \ uncompr.c \ zconf.h \ zlib.h \