# include <config.h>
#endif
+#include <Include/compiler.h>
+
#include <ctype.h> // isspace()
#include <stdlib.h> // atoi()
#include <math.h> // rint()
#include <stdio.h>
#include <string.h>
-#include <sys/stat.h> // stat()
-#include <errno.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h> // stat()
+#endif
+#ifdef FG_HAVE_STD_INCLUDES
+# include <cerrno>
+#else
+# include <errno.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h> // stat()
#endif
#include <string>
+#include STL_IOSTREAM
+
// #include <zlib/zlib.h>
#include <Misc/fgstream.hxx>
#include <Misc/strutils.hxx>
#define MAX_EX_NODES 10000
+#if 0
#ifdef WIN32
# ifdef __BORLANDC__
# include <dir.h>
# define MKDIR(a) mkdir(a,S_IRWXU) // I am just guessing at this flag (NHV)
# endif // __BORLANDC__
#endif // WIN32
+#endif //0
fgDEM::fgDEM( void ) {
}
+#if 0
#ifdef WIN32
// return the file path name ( foo/bar/file.ext = foo/bar )
}
#endif // WIN32
+#endif //0
// open a DEM file
string fgDEM::next_token() {
string token;
- in->stream() >> token;
+ *in >> token;
// cout << " returning " + token + "\n";
// return next integer from input stream
int fgDEM::next_int() {
int result;
-
- in->stream() >> result;
+
+ *in >> result;
return result;
}
double fgDEM::next_double() {
double result;
- in->stream() >> result;
+ *in >> result;
return result;
}
if ( result != 0 && errno == ENOENT ) {
cout << "Creating directory\n";
-#ifndef WIN32
+// #ifndef WIN32
command = "mkdir -p " + dir + "\n";
system( command.c_str() );
-#else // WIN32
+#if 0
+// #else // WIN32
// Cygwin crashes when trying to output to node file
// explicitly making directory structure seems OK on Win95
dir = fg_root + "/Scenery/" + base_path;
if (my_mkdir ( dir.c_str() )) { exit (-1); }
-#endif // WIN32
+// #endif // WIN32
+#endif //0
} else {
// assume directory exists
// $Log$
+// Revision 1.22 1999/01/19 20:56:56 curt
+// MacOS portability changes contributed by "Robert Puyol" <puyol@abvent.fr>
+//
+// Revision 1.21 1998/11/06 14:04:32 curt
+// Changes due to updates in fgstream.
+//
+// Revision 1.20 1998/10/28 19:38:20 curt
+// Elliminate some unnecessary win32 specific stuff (by Norman Vine)
+//
// Revision 1.19 1998/10/22 21:59:19 curt
// Fixed a couple subtle bugs that resulted from some of my c++ conversions.
// One bug could cause a segfault on certain input, and the other bug could