diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-14 11:11:06 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-01-19 19:47:27 +0100 |
commit | c03913c991787eb81de8832fccfe328ff9a86e9c (patch) | |
tree | 8dbc4f0360c4890c37d68a0ee99e569b92c44777 | |
parent | e1f782187449870b04301fc68d5f7e38d47a1faf (diff) | |
download | rneovim-c03913c991787eb81de8832fccfe328ff9a86e9c.tar.gz rneovim-c03913c991787eb81de8832fccfe328ff9a86e9c.tar.bz2 rneovim-c03913c991787eb81de8832fccfe328ff9a86e9c.zip |
Remove long_u: buffer_defs.h: Refactor long_u.
-rw-r--r-- | src/nvim/buffer_defs.h | 13 | ||||
-rw-r--r-- | src/nvim/option.c | 12 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index ff5f7853a3..d9684db3bc 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -2,6 +2,7 @@ #define NVIM_BUFFER_DEFS_H #include <stdbool.h> +#include <stdint.h> // for FILE #include <stdio.h> @@ -626,12 +627,12 @@ struct file_buffer { char_u *b_p_def; /* 'define' local value */ char_u *b_p_inc; /* 'include' */ char_u *b_p_inex; /* 'includeexpr' */ - long_u b_p_inex_flags; /* flags for 'includeexpr' */ + uint32_t b_p_inex_flags; /* flags for 'includeexpr' */ char_u *b_p_inde; /* 'indentexpr' */ - long_u b_p_inde_flags; /* flags for 'indentexpr' */ + uint32_t b_p_inde_flags; /* flags for 'indentexpr' */ char_u *b_p_indk; /* 'indentkeys' */ char_u *b_p_fex; /* 'formatexpr' */ - long_u b_p_fex_flags; /* flags for 'formatexpr' */ + uint32_t b_p_fex_flags; /* flags for 'formatexpr' */ char_u *b_p_kp; /* 'keywordprg' */ int b_p_lisp; /* 'lisp' */ char_u *b_p_mps; /* 'matchpairs' */ @@ -1082,9 +1083,9 @@ struct window_S { winopt_T w_allbuf_opt; /* A few options have local flags for P_INSECURE. */ - long_u w_p_stl_flags; /* flags for 'statusline' */ - long_u w_p_fde_flags; /* flags for 'foldexpr' */ - long_u w_p_fdt_flags; /* flags for 'foldtext' */ + uint32_t w_p_stl_flags; /* flags for 'statusline' */ + uint32_t w_p_fde_flags; /* flags for 'foldexpr' */ + uint32_t w_p_fdt_flags; /* flags for 'foldtext' */ int *w_p_cc_cols; /* array of columns to highlight or NULL */ int w_p_brimin; /* minimum width for breakindent */ int w_p_brishift; /* additional shift for breakindent */ diff --git a/src/nvim/option.c b/src/nvim/option.c index 54aeb5534c..a167363abf 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3597,12 +3597,12 @@ static uint32_t *insecure_flag(int opt_idx, int opt_flags) { if (opt_flags & OPT_LOCAL) switch ((int)options[opt_idx].indir) { - case PV_STL: return (uint32_t *)(&curwin->w_p_stl_flags); - case PV_FDE: return (uint32_t *)(&curwin->w_p_fde_flags); - case PV_FDT: return (uint32_t *)(&curwin->w_p_fdt_flags); - case PV_INDE: return (uint32_t *)(&curbuf->b_p_inde_flags); - case PV_FEX: return (uint32_t *)(&curbuf->b_p_fex_flags); - case PV_INEX: return (uint32_t *)(&curbuf->b_p_inex_flags); + case PV_STL: return &curwin->w_p_stl_flags; + case PV_FDE: return &curwin->w_p_fde_flags; + case PV_FDT: return &curwin->w_p_fdt_flags; + case PV_INDE: return &curbuf->b_p_inde_flags; + case PV_FEX: return &curbuf->b_p_fex_flags; + case PV_INEX: return &curbuf->b_p_inex_flags; } /* Nothing special, return global flags field. */ |