diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-16 21:06:21 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-16 21:06:21 +0200 |
commit | dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea (patch) | |
tree | 4c9124f2de51bedb339bc5cdb47a3086c0e92af9 /src/optiondefs.h | |
parent | 8aeec40207b5adcd3a155277dc4f29189343b963 (diff) | |
download | vim-git-dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea.tar.gz |
patch 8.1.2045: the option.c file is too bigv8.1.2045
Problem: The option.c file is too big.
Solution: Split off the code dealing with strings. (Yegappan Lakshmanan,
closes #4937)
Diffstat (limited to 'src/optiondefs.h')
-rw-r--r-- | src/optiondefs.h | 197 |
1 files changed, 2 insertions, 195 deletions
diff --git a/src/optiondefs.h b/src/optiondefs.h index 8e9d3f932..c21c8f6a9 100644 --- a/src/optiondefs.h +++ b/src/optiondefs.h @@ -243,112 +243,6 @@ typedef enum // buffers. Indicate this by setting "var" to VAR_WIN. #define VAR_WIN ((char_u *)-1) -// These are the global values for options which are also local to a buffer. -// Only to be used in option.c! -static int p_ai; -static int p_bin; -static int p_bomb; -static char_u *p_bh; -static char_u *p_bt; -static int p_bl; -static int p_ci; -#ifdef FEAT_CINDENT -static int p_cin; -static char_u *p_cink; -static char_u *p_cino; -#endif -#if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) -static char_u *p_cinw; -#endif -#ifdef FEAT_COMMENTS -static char_u *p_com; -#endif -#ifdef FEAT_FOLDING -static char_u *p_cms; -#endif -static char_u *p_cpt; -#ifdef FEAT_COMPL_FUNC -static char_u *p_cfu; -static char_u *p_ofu; -#endif -#ifdef FEAT_EVAL -static char_u *p_tfu; -#endif -static int p_eol; -static int p_fixeol; -static int p_et; -static char_u *p_fenc; -static char_u *p_ff; -static char_u *p_fo; -static char_u *p_flp; -static char_u *p_ft; -static long p_iminsert; -static long p_imsearch; -#if defined(FEAT_FIND_ID) && defined(FEAT_EVAL) -static char_u *p_inex; -#endif -#if defined(FEAT_CINDENT) && defined(FEAT_EVAL) -static char_u *p_inde; -static char_u *p_indk; -#endif -#if defined(FEAT_EVAL) -static char_u *p_fex; -#endif -static int p_inf; -static char_u *p_isk; -#ifdef FEAT_CRYPT -static char_u *p_key; -#endif -#ifdef FEAT_LISP -static int p_lisp; -#endif -static int p_ml; -static int p_ma; -static int p_mod; -static char_u *p_mps; -static char_u *p_nf; -static int p_pi; -#ifdef FEAT_TEXTOBJ -static char_u *p_qe; -#endif -static int p_ro; -#ifdef FEAT_SMARTINDENT -static int p_si; -#endif -static int p_sn; -static long p_sts; -#if defined(FEAT_SEARCHPATH) -static char_u *p_sua; -#endif -static long p_sw; -static int p_swf; -#ifdef FEAT_SYN_HL -static long p_smc; -static char_u *p_syn; -#endif -#ifdef FEAT_SPELL -static char_u *p_spc; -static char_u *p_spf; -static char_u *p_spl; -#endif -static long p_ts; -static long p_tw; -static int p_tx; -#ifdef FEAT_PERSISTENT_UNDO -static int p_udf; -#endif -static long p_wm; -#ifdef FEAT_VARTABS -static char_u *p_vsts; -static char_u *p_vts; -#endif -#ifdef FEAT_KEYMAP -static char_u *p_keymap; -#endif -#ifdef FEAT_TERMINAL -static long p_twsl; // 'termwinscroll' -#endif - // Saved values for when 'bin' is set. static int p_et_nobin; static int p_ml_nobin; @@ -387,53 +281,6 @@ struct vimoption #define VI_DEFAULT 0 // def_val[VI_DEFAULT] is Vi default value #define VIM_DEFAULT 1 // def_val[VIM_DEFAULT] is Vim default value -// -// Flags -// -#define P_BOOL 0x01 // the option is boolean -#define P_NUM 0x02 // the option is numeric -#define P_STRING 0x04 // the option is a string -#define P_ALLOCED 0x08 // the string option is in allocated memory, - // must use free_string_option() when - // assigning new value. Not set if default is - // the same. -#define P_EXPAND 0x10 // environment expansion. NOTE: P_EXPAND can - // never be used for local or hidden options! -#define P_NODEFAULT 0x40 // don't set to default value -#define P_DEF_ALLOCED 0x80 // default value is in allocated memory, must - // use vim_free() when assigning new value -#define P_WAS_SET 0x100 // option has been set/reset -#define P_NO_MKRC 0x200 // don't include in :mkvimrc output -#define P_VI_DEF 0x400 // Use Vi default for Vim -#define P_VIM 0x800 // Vim option, reset when 'cp' set - - // when option changed, what to display: -#define P_RSTAT 0x1000 // redraw status lines -#define P_RWIN 0x2000 // redraw current window and recompute text -#define P_RBUF 0x4000 // redraw current buffer and recompute text -#define P_RALL 0x6000 // redraw all windows -#define P_RCLR 0x7000 // clear and redraw all - -#define P_COMMA 0x8000 // comma separated list -#define P_ONECOMMA 0x18000L // P_COMMA and cannot have two consecutive - // commas -#define P_NODUP 0x20000L // don't allow duplicate strings -#define P_FLAGLIST 0x40000L // list of single-char flags - -#define P_SECURE 0x80000L // cannot change in modeline or secure mode -#define P_GETTEXT 0x100000L // expand default value with _() -#define P_NOGLOB 0x200000L // do not use local value for global vimrc -#define P_NFNAME 0x400000L // only normal file name chars allowed -#define P_INSECURE 0x800000L // option was set from a modeline -#define P_PRI_MKRC 0x1000000L // priority for :mkvimrc (setting option has - // side effects) -#define P_NO_ML 0x2000000L // not allowed in modeline -#define P_CURSWANT 0x4000000L // update curswant required; not needed when - // there is a redraw flag -#define P_NDNAME 0x8000000L // only normal dir name chars allowed -#define P_RWINONLY 0x10000000L // only redraw current window -#define P_MLE 0x20000000L // under control of 'modelineexpr' - #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255" // 'isprint' for latin1 is also used for MS-Windows cp1252, where 0x80 is used @@ -3158,45 +3005,5 @@ static struct vimoption options[] = #define PARAM_COUNT (sizeof(options) / sizeof(struct vimoption)) -static char *(p_ambw_values[]) = {"single", "double", NULL}; -static char *(p_bg_values[]) = {"light", "dark", NULL}; -static char *(p_nf_values[]) = {"bin", "octal", "hex", "alpha", NULL}; -static char *(p_ff_values[]) = {FF_UNIX, FF_DOS, FF_MAC, NULL}; -#ifdef FEAT_CRYPT -static char *(p_cm_values[]) = {"zip", "blowfish", "blowfish2", NULL}; -#endif -static char *(p_wop_values[]) = {"tagfile", NULL}; -#ifdef FEAT_WAK -static char *(p_wak_values[]) = {"yes", "menu", "no", NULL}; -#endif -static char *(p_mousem_values[]) = {"extend", "popup", "popup_setpos", "mac", NULL}; -static char *(p_sel_values[]) = {"inclusive", "exclusive", "old", NULL}; -static char *(p_slm_values[]) = {"mouse", "key", "cmd", NULL}; -static char *(p_km_values[]) = {"startsel", "stopsel", NULL}; -#ifdef FEAT_BROWSE -static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL}; -#endif -static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL}; -static char *(p_debug_values[]) = {"msg", "throw", "beep", NULL}; -static char *(p_ead_values[]) = {"both", "ver", "hor", NULL}; -static char *(p_buftype_values[]) = {"nofile", "nowrite", "quickfix", "help", "terminal", "acwrite", "prompt", "popup", NULL}; -static char *(p_bufhidden_values[]) = {"hide", "unload", "delete", "wipe", NULL}; -static char *(p_bs_values[]) = {"indent", "eol", "start", NULL}; -#ifdef FEAT_FOLDING -static char *(p_fdm_values[]) = {"manual", "expr", "marker", "indent", "syntax", -# ifdef FEAT_DIFF - "diff", -# endif - NULL}; -static char *(p_fcl_values[]) = {"all", NULL}; -#endif -static char *(p_cot_values[]) = {"menu", "menuone", "longest", "preview", "popup", "noinsert", "noselect", NULL}; -#ifdef BACKSLASH_IN_FILENAME -static char *(p_csl_values[]) = {"slash", "backslash", NULL}; -#endif -#ifdef FEAT_SIGNS -static char *(p_scl_values[]) = {"yes", "no", "auto", "number", NULL}; -#endif -#if defined(MSWIN) && defined(FEAT_TERMINAL) -static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL}; -#endif +// The following is needed to make the gen_opt_test.vim script work. +// {" |