Compare commits

...

9 Commits

14 changed files with 90 additions and 17 deletions

View File

@@ -22,7 +22,7 @@ PROJECT_NAME = SimGear
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 0.3.4-pre1
PROJECT_NUMBER = 0.3.4
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

5
NEWS
View File

@@ -1,5 +1,5 @@
New in 0.3.4-pre1
* October 15, 2003
New in 0.3.4
* October 22, 2003
* Removed Metakit, FlightGear no longer uses it.
* Removed all glut dependencies from SimGear.
@@ -21,6 +21,7 @@ New in 0.3.4-pre1
* Various Solaris fixes.
* Various cygwin/mingwin fixes.
* Various Mac OS X fixes.
* Various Irix fixes.
New in 0.3.3

View File

@@ -10,7 +10,7 @@ dnl Require at least automake 2.52
AC_PREREQ(2.52)
dnl Initialize the automake stuff
AM_INIT_AUTOMAKE(SimGear, 0.3.4-pre1)
AM_INIT_AUTOMAKE(SimGear, 0.3.4)
dnl Specify KAI C++ compiler and flags.
dnl Borrowed with slight modification from blitz distribution.

View File

@@ -0,0 +1,43 @@
#ifndef __SGI_HXX
#define __SGI_HXX
#include <string>
inline bool
operator!=( const std::string& lhs, const char* rhs)
{
return lhs.compare( rhs ) != 0;
}
inline bool
operator!=( const char* lhs, const std::string& rhs)
{
return rhs.compare( lhs ) != 0;
}
inline bool
operator==( const std::string& lhs, const char* rhs)
{
return lhs.compare( rhs ) == 0;
}
inline bool
operator==( const char* lhs, const std::string& rhs)
{
return rhs.compare( lhs ) == 0;
}
inline std::string
operator+(const std::string& lhs, const char* rhs)
{
return lhs + std::string(rhs);
}
inline std::string
operator+(const char* lhs, const std::string& rhs)
{
return std::string(lhs) + rhs;
}
#endif // !__SGI_HXX

View File

@@ -28,4 +28,6 @@ include_HEADERS = \
ctime \
iomanip \
new \
streambuf
streambuf \
\
IRIX

View File

@@ -6,6 +6,8 @@
namespace std {
using ::setw;
inline int setfill(int f) { ::setfill(f); }
};
#endif // !__SG_IOMANIP

View File

@@ -31,7 +31,20 @@
using ::ostream;
using ::dec;
using ::oct;
using ::hex;
enum { skipws=ios::skipws,
left=ios::left, right=ios::right, internal=ios::internal,
showbase=ios::showbase, showpoint=ios::showpoint,
uppercase=ios::uppercase, showpos=ios::showpos,
scientific=ios::scientific, fixed=ios::fixed,
unitbuf=ios::unitbuf, stdio=ios::stdio
#if _BOOL && __EDG_ABI_COMPATIBILITY_VERSION>227 /* bool support */
,boolalpha=ios::boolalpha
#endif /* bool support */
};
};
# endif

View File

@@ -2,11 +2,21 @@
#ifndef __SG_SSTREAM
#define __SG_SSTREAM 1
# include <iostream>
# include <strstream>
# include <string>
namespace std {
typedef ::ostrstream ostringstream;
typedef ::istrstream istringstream;
class ostringstream : public ostrstream {
public:
std::string str() { return string(ostrstream::str()); }
};
class istringstream : public istrstream {
};
};
#endif // !__SG_SSTREAM

View File

@@ -290,6 +290,8 @@
#if defined ( sgi ) && !defined( __GNUC__ )
# define SG_HAVE_NATIVE_SGI_COMPILERS
#include <simgear/compatibility/IRIX>
# define SG_EXPLICIT_FUNCTION_TMPL_ARGS
# define SG_CLASS_PARTIAL_SPECIALIZATION
# define SG_NEED_AUTO_PTR

View File

@@ -54,7 +54,7 @@ SGSocket::SGSocket( const string& host, const string& port_,
{
is_tcp = true;
}
else if ( style != (string)"udp" )
else if ( style != "udp" )
{
SG_LOG( SG_IO, SG_ALERT,
"Error: SGSocket() unknown style = " << style );

View File

@@ -18,17 +18,17 @@ int main (int ac, char ** av)
SGTabbedValues tv(string1);
if (tv[0] != string("Hello")) {
if (tv[0] != "Hello") {
cerr << "failed to read string at index 0" << endl;
return 1;
}
if (tv[1] != string("World")) {
if (tv[1] != "World") {
cerr << "failed to read string at index 1" << endl;
return 1;
}
if (tv[2] != string("34")) {
if (tv[2] != "34") {
cerr << "failed to read string at index 2" << endl;
return 1;
}
@@ -61,7 +61,7 @@ int main (int ac, char ** av)
return 3;
}
if (tv[5] != string("There Is No Spoon")) {
if (tv[5] != "There Is No Spoon") {
cerr << "failed to read string at index 5 (got [" << tv[5] << "]" << endl;
return 1;
}

View File

@@ -113,7 +113,7 @@ parse_name (const string &path, int &i)
name = ".";
}
if (i < max && path[i] != '/')
throw string(string("Illegal character after ") + name);
throw string("Illegal character after " + name);
}
else if (isalpha(path[i]) || path[i] == '_') {

View File

@@ -117,9 +117,9 @@ checkFlag (const char * flag, bool defaultState = true)
{
if (flag == 0)
return defaultState;
else if (string(flag) == "y")
else if (!strcmp(flag, "y"))
return true;
else if (string(flag) == "n")
else if (!strcmp(flag, "n"))
return false;
else {
string message = "Unrecognized flag value '";
@@ -137,7 +137,7 @@ PropsVisitor::startElement (const char * name, const XMLAttributes &atts)
const char * attval;
if (_level == 0) {
if (string(name) != (string)"PropertyList") {
if (strcmp(name, "PropertyList")) {
string message = "Root element name is ";
message += name;
message += "; expected PropertyList";

View File

@@ -86,7 +86,7 @@ sg_location::asString () const
{
char buf[128];
string out = "";
if (_path != (string)"") {
if (!_path.empty()) {
out += _path;
if (_line != -1 || _column != -1)
out += ",\n";