aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
authorZyX <kp-pav@ya.ru>2014-05-10 17:24:13 +0400
committerThiago de Arruda <tpadilha84@gmail.com>2014-06-02 11:04:17 -0300
commit70929f7e1616bab2783cc5735c6061981cda8a0f (patch)
tree4a947af96fa0bac749f843a41e7b6593dd2659c0 /src/nvim/undo.c
parent880957ad4e3fc0ff681025f5e29c5eccf797c564 (diff)
downloadrneovim-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/undo.c')
-rw-r--r--src/nvim/undo.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 42804210d0..5bc99f4e3e 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -106,34 +106,9 @@
#include "nvim/os/os.h"
#include "nvim/os/time.h"
-static long get_undolevel(void);
-static void u_unch_branch(u_header_T *uhp);
-static u_entry_T *u_get_headentry(void);
-static void u_getbot(void);
-static void u_doit(int count);
-static void u_undoredo(int undo);
-static void u_undo_end(int did_undo, int absolute);
-static void u_add_time(char_u *buf, size_t buflen, time_t tt);
-static void u_freeheader(buf_T *buf, u_header_T *uhp, u_header_T **uhpp);
-static void u_freebranch(buf_T *buf, u_header_T *uhp, u_header_T **uhpp);
-static void u_freeentries(buf_T *buf, u_header_T *uhp,
- u_header_T **uhpp);
-static void u_freeentry(u_entry_T *, long);
-static void corruption_error(char *mesg, char_u *file_name);
-static void u_free_uhp(u_header_T *uhp);
-static int serialize_header(FILE *fp, buf_T *buf, char_u *hash);
-static int serialize_uhp(FILE *fp, buf_T *buf, u_header_T *uhp);
-static u_header_T *unserialize_uhp(FILE *fp, char_u *file_name);
-static int serialize_uep(FILE *fp, buf_T *buf, u_entry_T *uep);
-static u_entry_T *unserialize_uep(FILE *fp, int *error,
- char_u *file_name);
-static void serialize_pos(pos_T pos, FILE *fp);
-static void unserialize_pos(pos_T *pos, FILE *fp);
-static void serialize_visualinfo(visualinfo_T *info, FILE *fp);
-static void unserialize_visualinfo(visualinfo_T *info, FILE *fp);
-static void put_header_ptr(FILE *fp, u_header_T *uhp);
-
-static char_u *u_save_line(linenr_T);
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "undo.c.generated.h"
+#endif
/* used in undo_end() to report number of added and deleted lines */
static long u_newcount, u_oldcount;