#include <boost/assert.hpp>
#include <boost/assert.hpp>
-
-namespace lyx {
-
-using docstring;
-
ASpell::ASpell(BufferParams const &, string const & lang)
: els(0), spell_error_object(0)
ASpell::ASpell(BufferParams const &, string const & lang)
: els(0), spell_error_object(0)
#ifndef LYX_ASPELL_H
#define LYX_ASPELL_H
#ifndef LYX_ASPELL_H
#define LYX_ASPELL_H
+#include "support/docstring.h"
+
+#include <map>
class AspellSpeller;
class AspellStringEnumeration;
class AspellCanHaveError;
class AspellConfig;
class AspellSpeller;
class AspellStringEnumeration;
class AspellCanHaveError;
class AspellConfig;
{
if (fd_ != -1) {
theApp->unregisterSocketCallback(fd_);
{
if (fd_ != -1) {
theApp->unregisterSocketCallback(fd_);
lyxerr << "lyx: Server socket " << fd_
<< " IO error on closing: " << strerror(errno);
}
lyxerr << "lyx: Server socket " << fd_
<< " IO error on closing: " << strerror(errno);
}
{
string const linen(line + '\n');
int const size = linen.size();
{
string const linen(line + '\n');
int const size = linen.size();
- int const written = ::write(fd_, linen.c_str(), size);
+ int const written = write(fd_, linen.c_str(), size);
if (written < size) { // Always mean end of connection.
if ((written == -1) && (errno == EPIPE)) {
// The program will also receive a SIGPIPE
if (written < size) { // Always mean end of connection.
if ((written == -1) && (errno == EPIPE)) {
// The program will also receive a SIGPIPE
LyXDataSocket::~LyXDataSocket()
{
LyXDataSocket::~LyXDataSocket()
{
lyxerr << "lyx: Data socket " << fd_
<< " IO error on closing: " << strerror(errno);
lyxerr << "lyx: Data socket " << fd_
<< " IO error on closing: " << strerror(errno);
int count;
// read and store characters in buffer
int count;
// read and store characters in buffer
- while ((count = ::read(fd_, charbuf, charbuf_size - 1)) > 0) {
+ while ((count = read(fd_, charbuf, charbuf_size - 1)) > 0) {
buffer_.append(charbuf, charbuf + count);
}
buffer_.append(charbuf, charbuf + count);
}
{
string const linen(line + '\n');
int const size = linen.size();
{
string const linen(line + '\n');
int const size = linen.size();
- int const written = ::write(fd_, linen.c_str(), size);
+ int const written = write(fd_, linen.c_str(), size);
if (written < size) { // Always mean end of connection.
if ((written == -1) && (errno == EPIPE)) {
// The program will also receive a SIGPIPE
if (written < size) { // Always mean end of connection.
if ((written == -1) && (errno == EPIPE)) {
// The program will also receive a SIGPIPE
return -1;
}
if (!TerminateProcess(hProcess, sig)) {
return -1;
}
if (!TerminateProcess(hProcess, sig)) {
- lyxerr << "kill process failed!" << endl;
+ lyxerr << "kill process failed!" << std::endl;
CloseHandle(hProcess);
return -1;
}
CloseHandle(hProcess);
return -1;
}
return ::mkstemp(templ);
#elif defined(HAVE_MKTEMP)
// This probably just barely works...
return ::mkstemp(templ);
#elif defined(HAVE_MKTEMP)
// This probably just barely works...
# if defined (HAVE_OPEN)
# if (!defined S_IRUSR)
# define S_IRUSR S_IREAD
# if defined (HAVE_OPEN)
# if (!defined S_IRUSR)
# define S_IRUSR S_IREAD
# endif
return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
# elif defined (HAVE__OPEN)
# endif
return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
# elif defined (HAVE__OPEN)
_O_RDWR | _O_CREAT | _O_EXCL,
_S_IREAD | _S_IWRITE);
# else
_O_RDWR | _O_CREAT | _O_EXCL,
_S_IREAD | _S_IWRITE);
# else
if (tmpf != -1) {
string const t(tmpl.get());
#if defined (HAVE_CLOSE)
if (tmpf != -1) {
string const t(tmpl.get());
#if defined (HAVE_CLOSE)
#elif defined (HAVE__CLOSE)
::_close(tmpf);
#else
#elif defined (HAVE__CLOSE)
::_close(tmpf);
#else