}
}
+#if defined(linux)
+std::ostream & operator<<
+ (
+ std::ostream & os,
+ const ManSearchPath & sp
+ )
+#else
ostream & operator<<
(
ostream & os,
const ManSearchPath & sp
)
+#endif
{
+#if defined(linux)
+ os << sp.GetEnvVar() << std::endl;
+#else
os << sp.GetEnvVar() << endl;
+#endif
sp.PrettyPrint(os);
return os;
}
#include "Options.h"
#include <stdlib.h>
+#if defined(linux)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
#include <stdio.h>
#include <pwd.h>
*
****************************************************************/
+#if defined(linux)
+void SearchPath::PrettyPrint
+ (
+ std::ostream & os
+ ) const
+#else
void SearchPath::PrettyPrint
(
ostream & os
) const
+#endif
{
CTokenizedString path (GetSearchPath(), Separator().data());
CString subpath = path.next();
while (!subpath.isNull()) {
+#if defined(linux)
+ os << " " << subpath << std::endl;
+#else
os << " " << subpath << endl;
+#endif
subpath = path.next();
}
+#if defined(linux)
+ os << std::endl;
+#else
os << endl;
+#endif
}
*
****************************************************************/
+#if defined(linux)
+std::ostream & operator<<
+ (
+ std::ostream & os,
+ const SearchPath & sp
+ )
+#else
ostream & operator<<
(
ostream & os,
const SearchPath & sp
)
+#endif
{
+#if defined(linux)
+ os << sp.GetEnvVar() << "SEARCHPATH:" << std::endl;
+#else
os << sp.GetEnvVar() << "SEARCHPATH:" << endl;
+#endif
sp.PrettyPrint(os);
return os;
}
virtual void ExportPath();
virtual void Print();
virtual void AddPredefinedPath();
+
+#if defined(linux)
+ virtual void PrettyPrint (std::ostream &) const;
+
+ friend std::ostream & operator<< (std::ostream &, const SearchPath &);
+#else
virtual void PrettyPrint (ostream &) const;
friend ostream & operator<< (ostream &, const SearchPath &);
+#endif
const char * GetEnvVar() const { return environment_var; }
CString GetSearchPath() const { return final_search_path; }
virtual void ExportPath ();
virtual void Print();
+#if defined(linux)
+ friend std::ostream & operator<< (std::ostream &, const ManSearchPath &);
+#else
friend ostream & operator<< (ostream &, const ManSearchPath &);
+#endif
protected:
virtual void MakePath (const CString &);