#include <config.h>
+#include "LyXRC.h"
+
#include "support/ConsoleApplication.h"
#include "support/debug.h"
#include "support/FileName.h"
namespace lyx {
-// Dummy verbose support
+// Required global variables
bool verbose = false;
-
-// Dummy LyXRC support
-struct LyXRC {
- string icon_set;
-} lyxrc;
+LyXRC lyxrc;
// Keep the linker happy on Windows
void lyx_exit(int)
namespace support {
-string itoa(unsigned int i)
-{
- char buf[20];
- sprintf(buf, "%d", i);
- return buf;
-}
-
-
/// Returns the absolute pathnames of all lyx local sockets in
/// file system encoding.
/// Parts stolen from lyx::support::DirList().
string linen(line + '\n');
int size = linen.size();
int written = ::write(fd_, linen.c_str(), size);
- if (written < size) { // Allways mean end of connection.
+ if (written < size) { // Always mean end of connection.
if ((written == -1) && (errno == EPIPE)) {
// The program will also receive a SIGPIPE
- // that must be catched
+ // that must be caught
cerr << "lyxclient: connection closed while writing."
<< endl;
} else {
docstring clientName =
- from_ascii(itoa(::getppid()) + ">" + itoa(::getpid()));
+ from_ascii(to_string(::getppid()) + ">" + to_string(::getpid()));
int n(vector<docstring> const & arg)
{
<< endl;
return -1;
}
- // -a supercedes LYXSOCKET environment variable
+ // -a supersedes LYXSOCKET environment variable
serverAddress = arg[0];
return 1;
}
return app.exec();
}
-
-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