summaryrefslogtreecommitdiff
path: root/src/spell.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-27 12:41:56 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-27 12:41:56 +0200
commit46a426c9acfdd3d6c0fa134a17681634b9325bee (patch)
tree04524eaade951e753e388a890c287a4373683fb0 /src/spell.h
parentd2842ea60bd608b7f9ec93c77d3f36a8e3bf5fe9 (diff)
downloadvim-git-46a426c9acfdd3d6c0fa134a17681634b9325bee.tar.gz
patch 8.1.2081: the spell.c file is too bigv8.1.2081
Problem: The spell.c file is too big. Solution: Move the code for spell suggestions to a separate file. (Yegappan Lakshmanan, closes #4988)
Diffstat (limited to 'src/spell.h')
-rw-r--r--src/spell.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/spell.h b/src/spell.h
index 380e5ecc0..dc102bc50 100644
--- a/src/spell.h
+++ b/src/spell.h
@@ -151,6 +151,8 @@ struct slang_S
#define WF_FIXCAP 0x40 /* keep-case word, allcap not allowed */
#define WF_KEEPCAP 0x80 /* keep-case word */
+#define WF_CAPMASK (WF_ONECAP | WF_ALLCAP | WF_KEEPCAP | WF_FIXCAP)
+
/* for <flags2>, shifted up one byte to be used in wn_flags */
#define WF_HAS_AFF 0x0100 /* word includes affix */
#define WF_NEEDCOMP 0x0200 /* word only valid in compound */
@@ -302,4 +304,18 @@ SPELL_EXTERN int did_set_spelltab;
#define SPELL_ADD_GOOD 0
#define SPELL_ADD_BAD 1
#define SPELL_ADD_RARE 2
+
+typedef struct wordcount_S
+{
+ short_u wc_count; /* nr of times word was seen */
+ char_u wc_word[1]; /* word, actually longer */
+} wordcount_T;
+
+#define WC_KEY_OFF offsetof(wordcount_T, wc_word)
+#define HI2WC(hi) ((wordcount_T *)((hi)->hi_key - WC_KEY_OFF))
+#define MAXWORDCOUNT 0xffff
+
+/* Remember what "z?" replaced. */
+SPELL_EXTERN char_u *repl_from SPELL_INIT(= NULL);
+SPELL_EXTERN char_u *repl_to SPELL_INIT(= NULL);
#endif