* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
- lyxerr.print("LyXComm: Pipe " + tmp + " already exists.");
- lyxerr.print("If no other LyX program is active, please delete"
- " the pipe by hand and try again.");
+ lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
+ << "If no other LyX program is active, please delete"
+ " the pipe by hand and try again." << endl;
return;
};
infd = open(tmp.c_str(), O_RDONLY|O_NONBLOCK);
#else
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
return;
};
infd = open(tmp.c_str(), O_RDONLY|O_NONBLOCK);
#else
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
return;
};
// Listen to it.
rc = DosConnectNPipe(fd);
if (rc != NO_ERROR && rc != ERROR_PIPE_NOT_CONNECTED) {
errnum = TranslateOS2Error(rc);
return;
};
// Listen to it.
rc = DosConnectNPipe(fd);
if (rc != NO_ERROR && rc != ERROR_PIPE_NOT_CONNECTED) {
errnum = TranslateOS2Error(rc);
- fl_add_io_callback(infd, FL_READ, callback, (void*)this);
+ fl_add_io_callback(infd, FL_READ, C_LyXComm_callback, (void*)this);
- lyxerr.print("LyXComm: Pipe " + tmp + " already exists.");
- lyxerr.print("If no other LyX program is active, please delete"
- " the pipe by hand and try again.");
+ lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
+ << "If no other LyX program is active, please delete"
+ " the pipe by hand and try again." << endl;
return;
}
outfd = open(tmp.c_str(), O_RDWR);
#else
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
return;
}
outfd = open(tmp.c_str(), O_RDWR);
#else
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
string tmp = pipename + ".in";
#ifdef __EMX__ // Notify the operating system.
rc = DosDisConnectNPipe(infd);
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
string tmp = pipename + ".in";
#ifdef __EMX__ // Notify the operating system.
rc = DosDisConnectNPipe(infd);
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
- if (lyxerr.debugging(Error::LYXSERVER)) {
- lyxerr.print(string("LyXComm: Receiving from fd ") + tostr(fd));
+ if (lyxerr.debugging(Debug::LYXSERVER)) {
+ lyxerr << "LyXComm: Receiving from fd " << fd << endl;
// split() grabs the entire string if
// the delim /wasn't/ found. ?:-P
lsbuf=split(lsbuf, cmd,'\n');
// split() grabs the entire string if
// the delim /wasn't/ found. ?:-P
lsbuf=split(lsbuf, cmd,'\n');
- lyxerr.debug(string("LyXComm: status:")
- + tostr(status) + ", lsbuf:" + lsbuf
- + ", cmd:" + cmd,
- Error::LYXSERVER);
+ lyxerr[Debug::LYXSERVER]
+ << "LyXComm: status:" << status
+ << ", lsbuf:" << lsbuf
+ << ", cmd:" << cmd << endl;
- lyxerr.print("LyXComm: Error sending message: " + msg);
- lyxerr.print(strerror(errno));
- lyxerr.print("LyXComm: Resetting connection");
+ lyxerr << "LyXComm: Error sending message: " << msg
+ << '\n' << strerror(errno)
+ << "\nLyXComm: Resetting connection" << endl;
if (strncmp(p, "LYXSRV:", 7)==0) {
server_only = true;
} else if(0!=strncmp(p, "LYXCMD:", 7)) {
if (strncmp(p, "LYXSRV:", 7)==0) {
server_only = true;
} else if(0!=strncmp(p, "LYXCMD:", 7)) {
- lyxerr.debug("LyXServer: Client: '" + client + "' Command: '" + cmd + "' Argument: '" + arg + '\'', Error::LYXSERVER);
+ lyxerr[Debug::LYXSERVER]
+ << "LyXServer: Client: '" << client
+ << "' Command: '" << cmd
+ << "' Argument: '" << arg << '\'' << endl;
- serv->clients[i].erase();
- lyxerr.debug("LyXServer: Client " + client + " said goodbye",
- Error::LYXSERVER);
+ serv->clients[i].clear();
+ lyxerr[Debug::LYXSERVER]
+ << "LyXServer: Client "
+ << client << " said goodbye"
+ << endl;
- lyxerr.debug("LyXServer: ignoring bye messge from unregistered client" +
- client + "\n", Error::LYXSERVER);
+ lyxerr[Debug::LYXSERVER]
+ << "LyXServer: ignoring bye messge from unregistered client"
+ << client << endl;