mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
898402adc6
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2862 a592a061-630c-0410-9148-cb99ea01b6c8
84 lines
1.2 KiB
C++
84 lines
1.2 KiB
C++
#ifndef SP_ISPELL_H
|
|
#define SP_ISPELL_H
|
|
|
|
#include <cstdio>
|
|
|
|
#include "sp_base.h"
|
|
|
|
class BufferParams;
|
|
|
|
|
|
class ISpell : public SpellBase
|
|
{
|
|
public:
|
|
|
|
enum ActualSpellChecker {
|
|
ASC_ISPELL,
|
|
ASC_ASPELL
|
|
};
|
|
|
|
ISpell();
|
|
|
|
ISpell(BufferParams const & params, string const & lang);
|
|
|
|
~ISpell();
|
|
|
|
|
|
/// initialize spell checker
|
|
void initialize(BufferParams const & params, string const & lang);
|
|
|
|
bool alive();
|
|
|
|
/// clean up after error
|
|
void cleanUp();
|
|
|
|
/// check word
|
|
enum spellStatus check(string const & word);
|
|
|
|
/// close spellchecker
|
|
void close();
|
|
|
|
void insert(string const & word);
|
|
|
|
void accept(string const & word);
|
|
|
|
/// store replacement
|
|
void store(string const & mis, string const & cor);
|
|
|
|
void sigchldhandler(pid_t pid, int *status);
|
|
|
|
char const * nextMiss();
|
|
|
|
char const * error();
|
|
|
|
private:
|
|
|
|
ActualSpellChecker actual_spell_checker;
|
|
|
|
/// instream to communicate with ispell
|
|
FILE * in;
|
|
|
|
/// outstream to communicate with ispell
|
|
FILE * out;
|
|
|
|
/// spell error
|
|
char const * error_;
|
|
|
|
/// ?
|
|
int isp_fd;
|
|
|
|
///
|
|
char * str;
|
|
///
|
|
spellStatus flag;
|
|
///
|
|
char * b;
|
|
///
|
|
char * e;
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|