diff options
author | ZyX <kp-pav@ya.ru> | 2014-05-10 17:24:13 +0400 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-02 11:04:17 -0300 |
commit | 70929f7e1616bab2783cc5735c6061981cda8a0f (patch) | |
tree | 4a947af96fa0bac749f843a41e7b6593dd2659c0 /src/nvim/diff.c | |
parent | 880957ad4e3fc0ff681025f5e29c5eccf797c564 (diff) | |
download | rneovim-70929f7e1616bab2783cc5735c6061981cda8a0f.tar.gz rneovim-70929f7e1616bab2783cc5735c6061981cda8a0f.tar.bz2 rneovim-70929f7e1616bab2783cc5735c6061981cda8a0f.zip |
Add automatic generation of headers
- The 'stripdecls.py' script replaces declarations in all headers by includes to
generated headers.
`ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'`
was used for this.
- Add and integrate gendeclarations.lua into the build system to generate the
required includes.
- Add -Wno-unused-function
- Made a bunch of old-style definitions ANSI
This adds a requirement: all type and structure definitions must be present
before INCLUDE_GENERATED_DECLARATIONS-protected include.
Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index b01a7a934a..b859871f98 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -46,24 +46,10 @@ static int diff_flags = DIFF_FILLER; // checked yet static int diff_a_works = MAYBE; -static int diff_buf_idx(buf_T *buf); -static int diff_buf_idx_tp(buf_T *buf, tabpage_T *tp); -static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, - linenr_T line2, long amount, - long amount_after); -static void diff_check_unchanged(tabpage_T *tp, diff_T *dp); -static int diff_check_sanity(tabpage_T *tp, diff_T *dp); -static void diff_redraw(int dofold); -static int diff_write(buf_T *buf, char_u *fname); -static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff); -static int diff_equal_entry(diff_T *dp, int idx1, int idx2); -static int diff_cmp(char_u *s1, char_u *s2); -static void diff_fold_update(diff_T *dp, int skip_idx); -static void diff_read(int idx_orig, int idx_new, char_u *fname); -static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, - int idx_new); -static diff_T* diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp); +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "diff.c.generated.h" +#endif #ifndef USE_CR # define tag_fgets vim_fgets #endif // ifndef USE_CR |