summaryrefslogtreecommitdiff
path: root/libs/hunspell/src/affentry.hxx
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2017-12-03 15:00:42 +0300
committerKirill Volinsky <mataes2007@gmail.com>2017-12-03 15:01:25 +0300
commit97e2d186da4024c7ac62f7549f3243bd15204118 (patch)
treea0fdb451333c952b3eb773094380d88d3464ac30 /libs/hunspell/src/affentry.hxx
parentd1f75ef5d26e7071fd1f6071e6c9a306fd19c33d (diff)
Hunspell: lib updated to 1.6.2
Diffstat (limited to 'libs/hunspell/src/affentry.hxx')
-rw-r--r--libs/hunspell/src/affentry.hxx77
1 files changed, 34 insertions, 43 deletions
diff --git a/libs/hunspell/src/affentry.hxx b/libs/hunspell/src/affentry.hxx
index 6311d83fff..4bafc043f4 100644
--- a/libs/hunspell/src/affentry.hxx
+++ b/libs/hunspell/src/affentry.hxx
@@ -1,6 +1,8 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
+ * Copyright (C) 2002-2017 Németh László
+ *
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
@@ -11,12 +13,7 @@
* for the specific language governing rights and limitations under the
* License.
*
- * The Original Code is Hunspell, based on MySpell.
- *
- * The Initial Developers of the Original Code are
- * Kevin Hendricks (MySpell) and Németh László (Hunspell).
- * Portions created by the Initial Developers are Copyright (C) 2002-2005
- * the Initial Developers. All Rights Reserved.
+ * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks.
*
* Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno,
* Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád,
@@ -71,10 +68,8 @@
* SUCH DAMAGE.
*/
-#ifndef _AFFIX_HXX_
-#define _AFFIX_HXX_
-
-#include "hunvisapi.h"
+#ifndef AFFIX_HXX_
+#define AFFIX_HXX_
#include "atypes.hxx"
#include "baseaffix.hxx"
@@ -82,7 +77,7 @@
/* A Prefix Entry */
-class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry {
+class PfxEntry : public AffEntry {
private:
PfxEntry(const PfxEntry&);
PfxEntry& operator=(const PfxEntry&);
@@ -96,10 +91,9 @@ class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry {
PfxEntry* flgnxt;
public:
- PfxEntry(AffixMgr* pmgr, affentry* dp);
- ~PfxEntry();
+ explicit PfxEntry(AffixMgr* pmgr);
- inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); }
+ bool allowCross() const { return ((opts & aeXPRODUCT) != 0); }
struct hentry* checkword(const char* word,
int len,
char in_compound,
@@ -110,19 +104,19 @@ class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry {
char in_compound,
const FLAG needflag = FLAG_NULL);
- char* check_morph(const char* word,
- int len,
- char in_compound,
- const FLAG needflag = FLAG_NULL);
+ std::string check_morph(const char* word,
+ int len,
+ char in_compound,
+ const FLAG needflag = FLAG_NULL);
- char* check_twosfx_morph(const char* word,
- int len,
- char in_compound,
- const FLAG needflag = FLAG_NULL);
+ std::string check_twosfx_morph(const char* word,
+ int len,
+ char in_compound,
+ const FLAG needflag = FLAG_NULL);
- inline FLAG getFlag() { return aflag; }
- inline const char* getKey() { return appnd.c_str(); }
- char* add(const char* word, size_t len);
+ FLAG getFlag() { return aflag; }
+ const char* getKey() { return appnd.c_str(); }
+ std::string add(const char* word, size_t len);
inline short getKeyLen() { return appnd.size(); }
@@ -147,7 +141,7 @@ class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry {
/* A Suffix Entry */
-class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry {
+class SfxEntry : public AffEntry {
private:
SfxEntry(const SfxEntry&);
SfxEntry& operator=(const SfxEntry&);
@@ -166,20 +160,16 @@ class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry {
SfxEntry* eq_morph;
public:
- SfxEntry(AffixMgr* pmgr, affentry* dp);
- ~SfxEntry();
+ explicit SfxEntry(AffixMgr* pmgr);
- inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); }
+ bool allowCross() const { return ((opts & aeXPRODUCT) != 0); }
struct hentry* checkword(const char* word,
int len,
int optflags,
PfxEntry* ppfx,
- char** wlst,
- int maxSug,
- int* ns,
- const FLAG cclass = FLAG_NULL,
- const FLAG needflag = FLAG_NULL,
- const FLAG badflag = FLAG_NULL);
+ const FLAG cclass,
+ const FLAG needflag,
+ const FLAG badflag);
struct hentry* check_twosfx(const char* word,
int len,
@@ -187,11 +177,11 @@ class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry {
PfxEntry* ppfx,
const FLAG needflag = FLAG_NULL);
- char* check_twosfx_morph(const char* word,
- int len,
- int optflags,
- PfxEntry* ppfx,
- const FLAG needflag = FLAG_NULL);
+ std::string check_twosfx_morph(const char* word,
+ int len,
+ int optflags,
+ PfxEntry* ppfx,
+ const FLAG needflag = FLAG_NULL);
struct hentry* get_next_homonym(struct hentry* he);
struct hentry* get_next_homonym(struct hentry* word,
int optflags,
@@ -199,9 +189,9 @@ class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry {
const FLAG cclass,
const FLAG needflag);
- inline FLAG getFlag() { return aflag; }
- inline const char* getKey() { return rappnd.c_str(); }
- char* add(const char* word, size_t len);
+ FLAG getFlag() { return aflag; }
+ const char* getKey() { return rappnd.c_str(); }
+ std::string add(const char* word, size_t len);
inline const char* getMorph() { return morphcode; }
@@ -224,6 +214,7 @@ class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry {
inline void setNextNE(SfxEntry* ptr) { nextne = ptr; }
inline void setNextEQ(SfxEntry* ptr) { nexteq = ptr; }
inline void setFlgNxt(SfxEntry* ptr) { flgnxt = ptr; }
+ void initReverseWord();
inline char* nextchar(char* p);
inline int test_condition(const char* st, const char* begin);