#include "ConsoleOutput.h"
+#if defined(linux)
+#include <iostream>
+#include <fstream>
+using namespace std;
+#else
#include <iostream.h>
#include <fstream.h>
+#endif
#include <errno.h>
#include <string.h>
#include <stdlib.h>
if (fd < 0)
return 0;
return file.attach(fd) != 0;
+#else
+#if defined(linux)
+ return file.open(filename, ios::out|ios::trunc) != 0;
#else
return file.open(filename, ios::out|ios::trunc|IOS_BINARY) != 0;
+ #endif
#endif
}
#include <stddef.h>
#endif
+#if defined(linux)
+#include <fstream>
+using namespace std;
+#else
class filebuf;
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#ifdef SP_SHORT_HEADERS
#include <strstrea.h>
#else
+#if defined(linux)
+#include <strstream>
+#else
#include <strstream.h>
#endif
+#endif
#include <string.h>
#include <sys/param.h>
encoder->output(copy.data(), copy.size(), &stream);
delete encoder;
char *s = stream.str();
+#if defined(linux)
+ String<char> result(s, stream.pcount());
+#else
String<char> result(s, stream.out_waiting());
+#endif
result += '\0';
stream.freeze(0);
#ifdef __lucid
#include <stddef.h>
+#if defined(linux)
+#include <streambuf>
+using namespace std;
+#else
class streambuf;
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#ifdef SP_MULTI_BYTE
#include "EUCJPCodingSystem.h"
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#include "Fixed2CodingSystem.h"
#include "macros.h"
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#include "splib.h"
#include "IdentityCodingSystem.h"
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#include <limits.h>
#ifdef SP_NAMESPACE
/*
* Flags passed into compile step when doing manual template instantiation.
*/
-CXXTEMPLATEFLAGS = -ptf
+CXXTEMPLATEFLAGS =
M4 = /usr/bin/m4
+
+CXXEXTRA_DEFINES = -fpermissive
+
#endif
#if defined(RsArchitecture)
#include "OutputCharStream.h"
#include "CodingSystem.h"
#include "macros.h"
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#include <stdio.h>
#ifdef SP_NAMESPACE
encoder_->output(buf_, ptr_ - buf_, byteStream_);
ptr_ = buf_;
}
+#if defined(linux)
+ byteStream_->pubsync();
+#else
byteStream_->sync();
+#endif
}
void IosOutputCharStream::flushBuf(Char c)
#include "Owner.h"
#include "CodingSystem.h"
+#if defined(linux)
+#include <streambuf>
+using namespace std;
+#else
class streambuf;
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
template<class T, class K, class HF, class KF>
OwnerTable<T, K, HF, KF>::~OwnerTable()
{
- for (size_t i = 0; i < vec_.size(); i++)
- delete vec_[i];
+ for (size_t i = 0; i < this->vec_.size(); i++)
+ delete this->vec_[i];
}
template<class T, class K, class HF, class KF>
void OwnerTable<T, K, HF, KF>::clear()
{
- for (size_t i = 0; i < vec_.size(); i++)
- delete vec_[i];
+ for (size_t i = 0; i < this->vec_.size(); i++)
+ delete this->vec_[i];
PointerTable<T *, K, HF, KF>::clear();
}
void
CopyOwnerTable<T, K, HF, KF>::operator=(const CopyOwnerTable<T, K, HF, KF> &t)
{
- clear();
+ this->clear();
//PointerTable<T *, K, HF, KF>::operator=(t);
// FIXME This isn't exception safe.
- for (size_t i = 0; i < vec_.size(); i++)
- if (vec_[i])
- vec_[i] = vec_[i]->copy();
+ for (size_t i = 0; i < this->vec_.size(); i++)
+ if (this->vec_[i])
+ this->vec_[i] = this->vec_[i]->copy();
}
#ifdef SP_NAMESPACE
#ifdef SP_MULTI_BYTE
#include "SJISCodingSystem.h"
+
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#include "UTF8CodingSystem.h"
#include "constant.h"
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
void *memmove(void *, const void *, size_t);
}
#endif
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#ifdef __GNUG__
// It's not missing, but it pulls in libg++
+#if !defined(linux)
#define SP_NEW_H_MISSING
// set_new_handler() has to be declared extern "C"
#define SP_SET_NEW_HANDLER_EXTERN_C
+#endif
#ifndef SP_MANUAL_INST
#define SP_MANUAL_INST
#endif
#include "sptchar.h"
#include "macros.h"
+#if defined(linux)
+#include <iostream>
+#include <fstream>
+#else
#include <iostream.h>
#include <fstream.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <errno.h>
const AppChar *filename,
const StringC &filenameStr,
const OutputCodingSystem *,
+#if defined(linux)
+ ::Messenger *messenger);
+#else
Messenger *messenger);
+#endif
~XRastEventHandler();
void message(MessageEvent *);
void truncateOutput();
void allLinkTypesActivated();
private:
+#if defined(linux)
+ ::Messenger *messenger_;
+#else
Messenger *messenger_;
+#endif
// file_ must come before os_ so it gets inited first
filebuf file_;
IosOutputCharStream os_;
const AppChar *filename,
const StringC &filenameStr,
const OutputCodingSystem *codingSystem,
- Messenger *messenger)
+#if defined(linux)
+ ::Messenger *messenger)
+#else
+ ::Messenger *messenger)
+#endif
: RastEventHandler(parser, messenger),
messenger_(messenger),
filename_(filename),
#else /* not SP_NEW_H_MISSING */
+#if defined(linux)
+#include <new>
+#else
#include <new.h>
+#endif
#endif /* not SP_NEW_H_MISSING */