mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
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
This commit is contained in:
parent
a77a2db213
commit
3347317b27
@ -1,3 +1,8 @@
|
||||
2005-06-09 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* 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 <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* lyx_main.C (parse_execute): Fix last fix: is_gui = false
|
||||
|
@ -14,66 +14,8 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#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 <cerrno>
|
||||
|
||||
#if defined (_WIN32)
|
||||
# include <io.h>
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user