From 3347317b27222d3cac4728e55200ceca9fa56eda Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 9 Jun 2005 09:04:33 +0000 Subject: [PATCH] Remove stub code that was actually disabling the lyxsocket. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10023 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 ++++ src/lyxsocket.C | 68 +++++-------------------------------------------- 2 files changed, 11 insertions(+), 62 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 434fae579b..dad110822d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-06-09 Angus Leeming + + * lyxsocket.C: remove stub code as it isn't needed by + MinGW/MinSYS anyway. Let's see if the MSVC people scream... + 2005-06-07 Georg Baum * lyx_main.C (parse_execute): Fix last fix: is_gui = false diff --git a/src/lyxsocket.C b/src/lyxsocket.C index 73f8b21069..bade99cb65 100644 --- a/src/lyxsocket.C +++ b/src/lyxsocket.C @@ -14,66 +14,8 @@ #include -#include - #include "lyxsocket.h" - -#if !(defined(HAVE_READ) && defined(HAVE_WRITE) && defined(HAVE_CLOSE)) -// We provide stub classes to disables the sockets. - -LyXServerSocket::LyXServerSocket(LyXFunc *, std::string const &) -{} - - -LyXServerSocket::~LyXServerSocket() -{} - - -std::string const & LyXServerSocket::address() const -{ - return address_; -} - - -void LyXServerSocket::serverCallback() -{} - - -void LyXServerSocket::dataCallback(int) -{} - - -void LyXServerSocket::writeln(std::string const &) -{} - - -LyXDataSocket::LyXDataSocket(int) -{} - - -LyXDataSocket::~LyXDataSocket() -{} - - -bool LyXDataSocket::connected() const -{ - return false; -} - - -bool LyXDataSocket::readln(std::string &) -{ - return false; -} - - -void LyXDataSocket::writeln(std::string const &) -{} - -#else // defined(HAVE_READ) && defined(HAVE_WRITE) && defined(HAVE_CLOSE) - - #include "debug.h" #include "funcrequest.h" #include "LyXAction.h" @@ -89,6 +31,10 @@ void LyXDataSocket::writeln(std::string const &) #include +#if defined (_WIN32) +# include +#endif + using boost::shared_ptr; using std::auto_ptr; @@ -217,7 +163,7 @@ void LyXServerSocket::writeln(string const & line) string const linen(line + '\n'); int const size = linen.size(); int const 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 caught @@ -312,7 +258,7 @@ void LyXDataSocket::writeln(string const & line) string const linen(line + '\n'); int const size = linen.size(); int const 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 @@ -328,5 +274,3 @@ void LyXDataSocket::writeln(string const & line) connected_ = false; } } - -#endif // defined(HAVE_READ) && defined(HAVE_WRITE) && defined(HAVE_CLOSE)