1#ifndef DEFINE_FUNC_ATTRIBUTES
2# define DEFINE_FUNC_ATTRIBUTES
3#endif
4#include "nvim/func_attr.h"
5#undef DEFINE_FUNC_ATTRIBUTES
6static long get_undolevel(void);
7static inline void zero_fmark_additional_data(fmark_T *fmarks);
8static void corruption_error(const char *const mesg, const char *const file_name) FUNC_ATTR_NONNULL_ALL;
9static void u_free_uhp(u_header_T *uhp);
10static _Bool serialize_header(bufinfo_T *bi, char_u *hash) FUNC_ATTR_NONNULL_ALL;
11static _Bool serialize_uhp(bufinfo_T *bi, u_header_T *uhp);
12static u_header_T *unserialize_uhp(bufinfo_T *bi, const char *file_name);
13static _Bool serialize_uep(bufinfo_T *bi, u_entry_T *uep);
14static u_entry_T *unserialize_uep(bufinfo_T *bi, _Bool *error, const char *file_name);
15static void serialize_pos(bufinfo_T *bi, pos_T pos);
16static void unserialize_pos(bufinfo_T *bi, pos_T *pos);
17static void serialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
18static void unserialize_visualinfo(bufinfo_T *bi, visualinfo_T *info);
19static _Bool undo_write(bufinfo_T *bi, uint8_t *ptr, size_t len) FUNC_ATTR_NONNULL_ARG(1);
20static _Bool undo_write_bytes(bufinfo_T *bi, uintmax_t nr, size_t len);
21static void put_header_ptr(bufinfo_T *bi, u_header_T *uhp);
22static int undo_read_4c(bufinfo_T *bi);
23static int undo_read_2c(bufinfo_T *bi);
24static int undo_read_byte(bufinfo_T *bi);
25static time_t undo_read_time(bufinfo_T *bi);
26static _Bool undo_read(bufinfo_T *bi, uint8_t *buffer, size_t size) FUNC_ATTR_NONNULL_ARG(1);
27static uint8_t *undo_read_string(bufinfo_T *bi, size_t len);
28static void u_doit(int startcount, _Bool quiet, _Bool do_buf_event);
29static void u_undoredo(int undo, _Bool do_buf_event);
30static void u_undo_end(_Bool did_undo, _Bool absolute, _Bool quiet);
31static void u_add_time(char_u *buf, size_t buflen, time_t tt);
32static void u_unch_branch(u_header_T *uhp);
33static u_entry_T *u_get_headentry(void);
34static void u_getbot(void);
35static void u_freeheader(buf_T *buf, u_header_T *uhp, u_header_T **uhpp );
36static void u_freebranch(buf_T *buf, u_header_T *uhp, u_header_T **uhpp );
37static void u_freeentries(buf_T *buf, u_header_T *uhp, u_header_T **uhpp );
38static void u_freeentry(u_entry_T *uep, long n);
39static char_u *u_save_line(linenr_T lnum);
40#include "nvim/func_attr.h"
41