Data Structures | Macros | Typedefs | Enumerations | Variables
spell_defs.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "nvim/buffer_defs.h"
#include "nvim/garray.h"
#include "nvim/regexp_defs.h"
#include "nvim/types.h"
#include <wchar.h>

Go to the source code of this file.

Data Structures

struct  fromto_S
 
struct  salitem_S
 
struct  slang_S
 
struct  langp_S
 
struct  spelltab_T
 
struct  trystate_S
 

Macros

#define MAXWLEN   254
 
#define MAXREGIONS   8
 
#define SPL_FNAME_TMPL   "%s.%s.spl"
 
#define SPL_FNAME_ADD   ".add."
 
#define SPL_FNAME_ASCII   ".ascii."
 
#define WF_REGION   0x01
 
#define WF_ONECAP   0x02
 
#define WF_ALLCAP   0x04
 
#define WF_RARE   0x08
 
#define WF_BANNED   0x10
 
#define WF_AFX   0x20
 
#define WF_FIXCAP   0x40
 
#define WF_KEEPCAP   0x80
 
#define WF_HAS_AFF   0x0100
 
#define WF_NEEDCOMP   0x0200
 
#define WF_NOSUGGEST   0x0400
 
#define WF_COMPROOT   0x0800
 
#define WF_NOCOMPBEF   0x1000
 
#define WF_NOCOMPAFT   0x2000
 
#define WFP_RARE   0x01
 
#define WFP_NC   0x02
 
#define WFP_UP   0x04
 
#define WFP_COMPPERMIT   0x08
 
#define WFP_COMPFORBID   0x10
 
#define WF_RAREPFX   (WFP_RARE << 24)
 
#define WF_PFX_NC   (WFP_NC << 24)
 
#define WF_PFX_UP   (WFP_UP << 24)
 
#define WF_PFX_COMPPERMIT   (WFP_COMPPERMIT << 24)
 
#define WF_PFX_COMPFORBID   (WFP_COMPFORBID << 24)
 
#define COMP_CHECKDUP   1
 
#define COMP_CHECKREP   2
 
#define COMP_CHECKCASE   4
 
#define COMP_CHECKTRIPLE   8
 
#define SP_TRUNCERROR   -1
 
#define SP_FORMERROR   -2
 
#define SP_OTHERERROR   -3
 
#define LANGP_ENTRY(ga, i)   (((langp_T *)(ga).ga_data) + (i))
 
#define VIMSUGMAGIC   "VIMsug"
 
#define VIMSUGMAGICL   6
 
#define VIMSUGVERSION   1
 
#define REGION_ALL   0xff
 
#define SPELL_TOFOLD(c)
 
#define SPELL_TOUPPER(c)
 
#define SPELL_ISUPPER(c)
 

Typedefs

typedef int idx_T
 
typedef struct fromto_S fromto_T
 
typedef struct salitem_S salitem_T
 
typedef int salfirst_T
 
typedef struct slang_S slang_T
 
typedef struct langp_S langp_T
 
typedef struct trystate_S trystate_T
 

Enumerations

enum  state_T {
  STATE_START = 0, STATE_NOPREFIX, STATE_SPLITUNDO, STATE_ENDNUL,
  STATE_PLAIN, STATE_DEL, STATE_INS_PREP, STATE_INS,
  STATE_SWAP, STATE_UNSWAP, STATE_SWAP3, STATE_UNSWAP3,
  STATE_UNROT3L, STATE_UNROT3R, STATE_REP_INI, STATE_REP,
  STATE_REP_UNDO, STATE_FINAL
}
 

Variables

slang_Tfirst_lang
 
char_uint_wordlist
 
spelltab_T spelltab
 
int did_set_spelltab
 
char * e_format
 

Macro Definition Documentation

#define COMP_CHECKCASE   4
#define COMP_CHECKDUP   1
#define COMP_CHECKREP   2
#define COMP_CHECKTRIPLE   8
#define LANGP_ENTRY (   ga,
  i 
)    (((langp_T *)(ga).ga_data) + (i))
#define MAXREGIONS   8
#define MAXWLEN   254
#define REGION_ALL   0xff
#define SP_FORMERROR   -2
#define SP_OTHERERROR   -3
#define SP_TRUNCERROR   -1
#define SPELL_ISUPPER (   c)
Value:
(enc_utf8 && (c) >= 128 ? mb_isupper(c) \
: (c) < 256 ? spelltab.st_isu[c] : iswupper(c))
bool st_isu[256]
Definition: spell_defs.h:206
#define enc_utf8
Definition: globals.h:652
bool mb_isupper(int a)
Definition: mbyte.c:1283
spelltab_T spelltab
Definition: spell.c:288
#define SPELL_TOFOLD (   c)
Value:
(enc_utf8 && (c) >= 128 ? utf_fold(c) \
: (c) < \
256 ? (int)spelltab.st_fold[c] : (int)towlower(c))
char_u st_fold[256]
Definition: spell_defs.h:207
#define enc_utf8
Definition: globals.h:652
int utf_fold(int a)
Definition: mbyte.c:1219
spelltab_T spelltab
Definition: spell.c:288
#define SPELL_TOUPPER (   c)
Value:
(enc_utf8 && (c) >= 128 ? mb_toupper(c) \
: (c) < \
256 ? (int)spelltab.st_upper[c] : (int)towupper(c))
char_u st_upper[256]
Definition: spell_defs.h:208
int mb_toupper(int a)
Definition: mbyte.c:1235
#define enc_utf8
Definition: globals.h:652
spelltab_T spelltab
Definition: spell.c:288
#define SPL_FNAME_ADD   ".add."
#define SPL_FNAME_ASCII   ".ascii."
#define SPL_FNAME_TMPL   "%s.%s.spl"
#define VIMSUGMAGIC   "VIMsug"
#define VIMSUGMAGICL   6
#define VIMSUGVERSION   1
#define WF_AFX   0x20
#define WF_ALLCAP   0x04
#define WF_BANNED   0x10
#define WF_COMPROOT   0x0800
#define WF_FIXCAP   0x40
#define WF_HAS_AFF   0x0100
#define WF_KEEPCAP   0x80
#define WF_NEEDCOMP   0x0200
#define WF_NOCOMPAFT   0x2000
#define WF_NOCOMPBEF   0x1000
#define WF_NOSUGGEST   0x0400
#define WF_ONECAP   0x02
#define WF_PFX_COMPFORBID   (WFP_COMPFORBID << 24)
#define WF_PFX_COMPPERMIT   (WFP_COMPPERMIT << 24)
#define WF_PFX_NC   (WFP_NC << 24)
#define WF_PFX_UP   (WFP_UP << 24)
#define WF_RARE   0x08
#define WF_RAREPFX   (WFP_RARE << 24)
#define WF_REGION   0x01
#define WFP_COMPFORBID   0x10
#define WFP_COMPPERMIT   0x08
#define WFP_NC   0x02
#define WFP_RARE   0x01
#define WFP_UP   0x04

Typedef Documentation

typedef struct fromto_S fromto_T
typedef int idx_T
typedef struct langp_S langp_T
typedef int salfirst_T
typedef struct salitem_S salitem_T
typedef struct slang_S slang_T
typedef struct trystate_S trystate_T

Enumeration Type Documentation

enum state_T
Enumerator
STATE_START 
STATE_NOPREFIX 
STATE_SPLITUNDO 
STATE_ENDNUL 
STATE_PLAIN 
STATE_DEL 
STATE_INS_PREP 
STATE_INS 
STATE_SWAP 
STATE_UNSWAP 
STATE_SWAP3 
STATE_UNSWAP3 
STATE_UNROT3L 
STATE_UNROT3R 
STATE_REP_INI 
STATE_REP 
STATE_REP_UNDO 
STATE_FINAL 

Variable Documentation

int did_set_spelltab
char* e_format
slang_T* first_lang
char_u* int_wordlist
spelltab_T spelltab