#include <config.h>
#include "debug.h"
-#include "format.h"
+#include "support/unicode.h"
#include "support/lstrings.h"
#include <boost/filesystem/operations.hpp>
#include <boost/scoped_ptr.hpp>
// getpid(), getppid()
-#include <sys/types.h>
-#include <unistd.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+// struct timeval
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
// select()
-#include <sys/select.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
// socket(), connect()
-#include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#include <sys/un.h>
// fcntl()
#include <map>
#include <iostream>
+
+namespace lyx {
+
using lyx::support::prefixIs;
using boost::scoped_ptr;
using std::endl;
-// hack to link in libsupport
-Formats formats;
+IconvProcessor & utf8ToUcs4()
+{
+ static IconvProcessor iconv(ucs4_codeset, "UTF-8");
+ return iconv;
+}
namespace support {
for (; beg != end; ++beg) {
if (prefixIs(beg->leaf(), "lyx_tmpdir" + pid)) {
- fs::path lyxsocket = *beg / "lyxsocket";
+ fs::path lyxsocket = beg->path() / "lyxsocket";
if (fs::exists(lyxsocket)) {
dirlist.push_back(lyxsocket);
}
} // namespace cmdline
-
-
+} // namespace lyx
int main(int argc, char * argv[])
{
+ using namespace lyx;
lyxerr.rdbuf(cerr.rdbuf());
CmdLineParser args;
return EXIT_SUCCESS;
}
+
+
+namespace boost {
+
+void assertion_failed(char const* a, char const* b, char const* c, long d)
+{
+ lyx::lyxerr << "Assertion failed: " << a << ' ' << b << ' ' << c << ' '
+ << d << '\n';
+}
+
+} // namespace boost
+