]> git.lyx.org Git - lyx.git/blobdiff - src/client/client.cpp
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / src / client / client.cpp
index 9b494c1eb201bd1e9ce63df1ea9eb763e71e765b..19e38fae5174b8df8d088c594915968473aecf22 100644 (file)
@@ -16,6 +16,7 @@
 #include "support/FileName.h"
 #include "support/FileNameList.h"
 #include "support/lstrings.h"
+#include "support/Messages.h"
 #include "support/unicode.h"
 
 #include <boost/scoped_ptr.hpp>
@@ -74,6 +75,21 @@ struct LyXRC {
 void lyx_exit(int)
 {}
 
+// Dummy language support
+Messages const & getGuiMessages()
+{
+       static Messages lyx_messages;
+
+       return lyx_messages;
+}
+
+
+Messages const & getMessages(string const &)
+{
+       return getGuiMessages();
+}
+
+
 namespace support {
 
 string itoa(unsigned int i)
@@ -293,7 +309,7 @@ bool LyXDataSocket::connected() const
 // Returns true if there was a complete line to input
 // A line is of the form <key>:<value>
 //   A line not of this form will not be passed
-// The line read is splitted and stored in 'key' and 'value'
+// The line read is split and stored in 'key' and 'value'
 bool LyXDataSocket::readln(string & line)
 {
        int const charbuf_size = 100;
@@ -446,7 +462,7 @@ docstring clientName =
 
 int n(vector<docstring> const & arg)
 {
-       if (arg.size() < 1) {
+       if (arg.empty()) {
                cerr << "lyxclient: The option -n requires 1 argument."
                     << endl;
                return -1;
@@ -461,7 +477,7 @@ docstring singleCommand;
 
 int c(vector<docstring> const & arg)
 {
-       if (arg.size() < 1) {
+       if (arg.empty()) {
                cerr << "lyxclient: The option -c requires 1 argument."
                     << endl;
                return -1;
@@ -491,7 +507,7 @@ docstring serverAddress;
 
 int a(vector<docstring> const & arg)
 {
-       if (arg.size() < 1) {
+       if (arg.empty()) {
                cerr << "lyxclient: The option -a requires 1 argument."
                     << endl;
                return -1;
@@ -506,7 +522,7 @@ int a(vector<docstring> const & arg)
 
 int t(vector<docstring> const & arg)
 {
-       if (arg.size() < 1) {
+       if (arg.empty()) {
                cerr << "lyxclient: The option -t requires 1 argument."
                     << endl;
                return -1;
@@ -521,7 +537,7 @@ string serverPid; // Init to empty string
 
 int p(vector<docstring> const & arg)
 {
-       if (arg.size() < 1) {
+       if (arg.empty()) {
                cerr << "lyxclient: The option -p requires 1 argument."
                     << endl;
                return -1;