From 70929f7e1616bab2783cc5735c6061981cda8a0f Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 10 May 2014 17:24:13 +0400 Subject: 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. --- src/nvim/undo.h | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) (limited to 'src/nvim/undo.h') diff --git a/src/nvim/undo.h b/src/nvim/undo.h index 5f37a5849e..053e62fdde 100644 --- a/src/nvim/undo.h +++ b/src/nvim/undo.h @@ -3,34 +3,7 @@ #include "nvim/undo_defs.h" -/* undo.c */ -int u_save_cursor(void); -int u_save(linenr_T top, linenr_T bot); -int u_savesub(linenr_T lnum); -int u_inssub(linenr_T lnum); -int u_savedel(linenr_T lnum, long nlines); -int undo_allowed(void); -int u_savecommon(linenr_T top, linenr_T bot, linenr_T newbot, - int reload); -void u_compute_hash(char_u *hash); -char_u *u_get_undo_file_name(char_u *buf_ffname, int reading); -void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash); -void u_read_undo(char_u *name, char_u *hash, char_u *orig_name); -void u_undo(int count); -void u_redo(int count); -void undo_time(long step, int sec, int file, int absolute); -void u_sync(int force); -void ex_undolist(exarg_T *eap); -void ex_undojoin(exarg_T *eap); -void u_unchanged(buf_T *buf); -void u_find_first_changed(void); -void u_update_save_nr(buf_T *buf); -void u_clearall(buf_T *buf); -void u_saveline(linenr_T lnum); -void u_clearline(void); -void u_undoline(void); -void u_blockfree(buf_T *buf); -int bufIsChanged(buf_T *buf); -int curbufIsChanged(void); -void u_eval_tree(u_header_T *first_uhp, list_T *list); +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "undo.h.generated.h" +#endif #endif /* NVIM_UNDO_H */ -- cgit From dca28e55c7f798238e693d6db56da201c8d6dc29 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 1 Jun 2014 02:11:35 +0400 Subject: Fix some styles --- src/nvim/undo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/undo.h') diff --git a/src/nvim/undo.h b/src/nvim/undo.h index 053e62fdde..ab8584fbb2 100644 --- a/src/nvim/undo.h +++ b/src/nvim/undo.h @@ -6,4 +6,4 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "undo.h.generated.h" #endif -#endif /* NVIM_UNDO_H */ +#endif // NVIM_UNDO_H -- cgit