Added initial support for native SGI compilers.
This commit is contained in:
parent
739588f9c3
commit
d136ad3e57
9 changed files with 72 additions and 21 deletions
|
@ -72,11 +72,11 @@ void fgBucketParseIndex(long int index, fgBUCKET *p) {
|
||||||
|
|
||||||
// Build a path name from an tile index
|
// Build a path name from an tile index
|
||||||
void fgBucketGenBasePath( const fgBUCKET *p, char *path) {
|
void fgBucketGenBasePath( const fgBUCKET *p, char *path) {
|
||||||
long int index;
|
// long int index;
|
||||||
int top_lon, top_lat, main_lon, main_lat;
|
int top_lon, top_lat, main_lon, main_lat;
|
||||||
char hem, pole;
|
char hem, pole;
|
||||||
|
|
||||||
index = fgBucketGenIndex(p);
|
// index = fgBucketGenIndex(p);
|
||||||
|
|
||||||
path[0] = '\0';
|
path[0] = '\0';
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ void fgBucketFind(double lon, double lat, fgBUCKET *p) {
|
||||||
|
|
||||||
// Given a lat/lon, fill in the local tile index array
|
// Given a lat/lon, fill in the local tile index array
|
||||||
void fgBucketGenIdxArray(fgBUCKET *p1, fgBUCKET *tiles, int width, int height) {
|
void fgBucketGenIdxArray(fgBUCKET *p1, fgBUCKET *tiles, int width, int height) {
|
||||||
fgBUCKET *p2;
|
// fgBUCKET *p2;
|
||||||
int dw, dh, i, j;
|
int dw, dh, i, j;
|
||||||
|
|
||||||
dh = height / 2;
|
dh = height / 2;
|
||||||
|
@ -214,7 +214,7 @@ void fgBucketGenIdxArray(fgBUCKET *p1, fgBUCKET *tiles, int width, int height) {
|
||||||
for ( j = 0; j < height; j++ ) {
|
for ( j = 0; j < height; j++ ) {
|
||||||
for ( i = 0; i < width; i++ ) {
|
for ( i = 0; i < width; i++ ) {
|
||||||
fgBucketOffset(p1, &tiles[(j*width)+i], i - dw, j - dh);
|
fgBucketOffset(p1, &tiles[(j*width)+i], i - dw, j - dh);
|
||||||
p2 = &tiles[(j*width)+i];
|
// p2 = &tiles[(j*width)+i];
|
||||||
/* printf( " bucket = %d %d %d %d index = %ld\n",
|
/* printf( " bucket = %d %d %d %d index = %ld\n",
|
||||||
p2->lon, p2->lat, p2->x, p2->y,
|
p2->lon, p2->lat, p2->x, p2->y,
|
||||||
fgBucketGenIndex(&tiles[(j*width)+i])); */
|
fgBucketGenIndex(&tiles[(j*width)+i])); */
|
||||||
|
@ -265,6 +265,9 @@ int main() {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.2 1999/02/26 22:07:53 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.1 1999/02/17 20:52:05 curt
|
// Revision 1.1 1999/02/17 20:52:05 curt
|
||||||
// Renamed bucketutils.c -> bucketutils.cxx
|
// Renamed bucketutils.c -> bucketutils.cxx
|
||||||
//
|
//
|
||||||
|
|
|
@ -34,12 +34,12 @@
|
||||||
|
|
||||||
// Build the path name for this bucket
|
// Build the path name for this bucket
|
||||||
string FGBucket::gen_base_path() {
|
string FGBucket::gen_base_path() {
|
||||||
long int index;
|
// long int index;
|
||||||
int top_lon, top_lat, main_lon, main_lat;
|
int top_lon, top_lat, main_lon, main_lat;
|
||||||
char hem, pole;
|
char hem, pole;
|
||||||
char path[256];
|
char path[256];
|
||||||
|
|
||||||
index = gen_index();
|
// index = gen_index();
|
||||||
|
|
||||||
path[0] = '\0';
|
path[0] = '\0';
|
||||||
|
|
||||||
|
@ -146,6 +146,9 @@ void fgBucketDiff( const FGBucket& b1, const FGBucket& b2, int *dx, int *dy ) {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.3 1999/02/26 22:07:54 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.2 1999/02/11 01:09:33 curt
|
// Revision 1.2 1999/02/11 01:09:33 curt
|
||||||
// Added a routine to calculate the offset in bucket units between two buckets.
|
// Added a routine to calculate the offset in bucket units between two buckets.
|
||||||
//
|
//
|
||||||
|
@ -154,3 +157,4 @@ void fgBucketDiff( const FGBucket& b1, const FGBucket& b2, int *dx, int *dy ) {
|
||||||
// fgBUCKET struct and C routines. This FGBucket class adjusts the tile
|
// fgBUCKET struct and C routines. This FGBucket class adjusts the tile
|
||||||
// width towards the poles to ensure the tiles are at least 8 miles wide.
|
// width towards the poles to ensure the tiles are at least 8 miles wide.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <Include/compiler.h>
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
#include <string>
|
#include STL_STRING
|
||||||
|
|
||||||
FG_USING_STD(string);
|
FG_USING_STD(string);
|
||||||
FG_USING_NAMESPACE(std);
|
FG_USING_NAMESPACE(std);
|
||||||
|
@ -290,6 +290,9 @@ fgBucketGenIndex( const fgBUCKET& p )
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.3 1999/02/26 22:07:55 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.2 1999/02/11 01:09:34 curt
|
// Revision 1.2 1999/02/11 01:09:34 curt
|
||||||
// Added a routine to calculate the offset in bucket units between two buckets.
|
// Added a routine to calculate the offset in bucket units between two buckets.
|
||||||
//
|
//
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
// (Log is kept at end of this file)
|
// (Log is kept at end of this file)
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
|
#include STL_STRING
|
||||||
|
|
||||||
#include <Debug/logstream.hxx>
|
#include <Debug/logstream.hxx>
|
||||||
#include <Include/fg_zlib.h>
|
#include <Include/fg_zlib.h>
|
||||||
|
@ -101,6 +103,9 @@ fgINTERPTABLE::~fgINTERPTABLE( void ) {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.7 1999/02/26 22:08:03 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.6 1999/01/27 04:46:16 curt
|
// Revision 1.6 1999/01/27 04:46:16 curt
|
||||||
// Portability tweaks by Bernie Bright.
|
// Portability tweaks by Bernie Bright.
|
||||||
//
|
//
|
||||||
|
|
|
@ -32,12 +32,15 @@
|
||||||
# error This library requires C++
|
# error This library requires C++
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "Include/compiler.h"
|
#include "Include/compiler.h"
|
||||||
|
|
||||||
|
#include STL_STRING
|
||||||
FG_USING_STD(string);
|
FG_USING_STD(string);
|
||||||
|
|
||||||
|
#ifdef FG_HAVE_NATIVE_SGI_COMPILERS
|
||||||
|
FG_USING_NAMESPACE(std);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_TABLE_SIZE 32
|
#define MAX_TABLE_SIZE 32
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,6 +66,9 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.5 1999/02/26 22:08:05 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.4 1999/01/27 04:46:17 curt
|
// Revision 1.4 1999/01/27 04:46:17 curt
|
||||||
// Portability tweaks by Bernie Bright.
|
// Portability tweaks by Bernie Bright.
|
||||||
//
|
//
|
||||||
|
|
|
@ -32,20 +32,27 @@
|
||||||
# include "Include/config.h"
|
# include "Include/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
#include "Include/compiler.h"
|
#if defined( FG_HAVE_STD_INCLUDES )
|
||||||
#ifdef FG_HAVE_STD_INCLUDES
|
|
||||||
# include <istream>
|
# include <istream>
|
||||||
|
#elif defined ( FG_HAVE_NATIVE_SGI_COMPILERS )
|
||||||
|
# include <CC/stream.h>
|
||||||
#else
|
#else
|
||||||
# include <istream.h>
|
# include <istream.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include STL_STRING
|
||||||
|
|
||||||
|
#include "zfstream.hxx"
|
||||||
|
|
||||||
FG_USING_STD(string);
|
FG_USING_STD(string);
|
||||||
FG_USING_STD(istream);
|
FG_USING_STD(istream);
|
||||||
|
|
||||||
|
#ifdef FG_HAVE_NATIVE_SGI_COMPILERS
|
||||||
|
FG_USING_NAMESPACE(std);
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "zfstream.hxx"
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
@ -92,6 +99,9 @@ istream& skipcomment( istream& in );
|
||||||
#endif /* _FGSTREAM_HXX */
|
#endif /* _FGSTREAM_HXX */
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.7 1999/02/26 22:08:08 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.6 1999/01/19 20:41:46 curt
|
// Revision 1.6 1999/01/19 20:41:46 curt
|
||||||
// Portability updates contributed by Bernie Bright.
|
// Portability updates contributed by Bernie Bright.
|
||||||
//
|
//
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#ifndef STRUTILS_H
|
#ifndef STRUTILS_H
|
||||||
#define STRUTILS_H
|
#define STRUTILS_H
|
||||||
|
|
||||||
#include <string>
|
#include <Include/compiler.h>
|
||||||
#include "Include/compiler.h"
|
#include STL_STRING
|
||||||
|
|
||||||
#ifdef FG_HAVE_STD_INCLUDES
|
#ifdef FG_HAVE_STD_INCLUDES
|
||||||
# include <cstdlib>
|
# include <cstdlib>
|
||||||
|
@ -35,6 +35,10 @@
|
||||||
|
|
||||||
FG_USING_STD(string);
|
FG_USING_STD(string);
|
||||||
|
|
||||||
|
#ifdef FG_HAVE_NATIVE_SGI_COMPILERS
|
||||||
|
FG_USING_NAMESPACE(std);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Default characters to remove.
|
// Default characters to remove.
|
||||||
extern const string whitespace;
|
extern const string whitespace;
|
||||||
|
|
||||||
|
@ -64,6 +68,9 @@ atoi( const string& str )
|
||||||
#endif // STRUTILS_H
|
#endif // STRUTILS_H
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.5 1999/02/26 22:08:09 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.4 1999/01/19 20:41:47 curt
|
// Revision 1.4 1999/01/19 20:41:47 curt
|
||||||
// Portability updates contributed by Bernie Bright.
|
// Portability updates contributed by Bernie Bright.
|
||||||
//
|
//
|
||||||
|
|
|
@ -66,6 +66,8 @@ FG_USING_STD(streamoff);
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC_MINOR__ < 8
|
#if defined(__GNUC__) && __GNUC_MINOR__ < 8
|
||||||
# define ios_binary ios::bin
|
# define ios_binary ios::bin
|
||||||
|
#elif defined( FG_HAVE_NATIVE_SGI_COMPILERS )
|
||||||
|
# define ios_binary 1
|
||||||
#else
|
#else
|
||||||
# define ios_binary ios::binary
|
# define ios_binary ios::binary
|
||||||
#endif
|
#endif
|
||||||
|
@ -152,6 +154,9 @@ struct gzifstream_base
|
||||||
#endif // _zfstream_hxx
|
#endif // _zfstream_hxx
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.8 1999/02/26 22:08:10 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.7 1999/01/19 20:41:49 curt
|
// Revision 1.7 1999/01/19 20:41:49 curt
|
||||||
// Portability updates contributed by Bernie Bright.
|
// Portability updates contributed by Bernie Bright.
|
||||||
//
|
//
|
||||||
|
|
|
@ -34,14 +34,19 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Include/compiler.h"
|
|
||||||
#include <string>
|
|
||||||
FG_USING_STD(string);
|
|
||||||
|
|
||||||
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined( __CYGWIN32__ )
|
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined( __CYGWIN32__ )
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <Include/compiler.h>
|
||||||
|
#include STL_STRING
|
||||||
|
FG_USING_STD(string);
|
||||||
|
|
||||||
|
#ifdef FG_HAVE_NATIVE_SGI_COMPILERS
|
||||||
|
FG_USING_NAMESPACE(std);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// if someone know how to do this all with C++ streams let me know
|
// if someone know how to do this all with C++ streams let me know
|
||||||
// #include <stdio.h>
|
// #include <stdio.h>
|
||||||
|
|
||||||
|
@ -80,6 +85,9 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.4 1999/02/26 22:08:13 curt
|
||||||
|
// Added initial support for native SGI compilers.
|
||||||
|
//
|
||||||
// Revision 1.3 1999/02/02 20:13:24 curt
|
// Revision 1.3 1999/02/02 20:13:24 curt
|
||||||
// MSVC++ portability changes by Bernie Bright:
|
// MSVC++ portability changes by Bernie Bright:
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue