comparison src/undo.c @ 2236:dc2e5ec0500d vim73

Added the undofile() function. Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Sun, 30 May 2010 18:30:36 +0200
parents 4ba83ae8d505
children 3d0a7beb0d75
comparison
equal deleted inserted replaced
2235:4ba83ae8d505 2236:dc2e5ec0500d
98 static void u_freeheader __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp)); 98 static void u_freeheader __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
99 static void u_freebranch __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp)); 99 static void u_freebranch __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
100 static void u_freeentries __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp)); 100 static void u_freeentries __ARGS((buf_T *buf, u_header_T *uhp, u_header_T **uhpp));
101 static void u_freeentry __ARGS((u_entry_T *, long)); 101 static void u_freeentry __ARGS((u_entry_T *, long));
102 #ifdef FEAT_PERSISTENT_UNDO 102 #ifdef FEAT_PERSISTENT_UNDO
103 static char_u *u_get_undo_file_name __ARGS((char_u *, int reading));
104 static void corruption_error __ARGS((char *msg, char_u *file_name)); 103 static void corruption_error __ARGS((char *msg, char_u *file_name));
105 static void u_free_uhp __ARGS((u_header_T *uhp)); 104 static void u_free_uhp __ARGS((u_header_T *uhp));
106 static int serialize_uep __ARGS((u_entry_T *uep, FILE *fp)); 105 static int serialize_uep __ARGS((u_entry_T *uep, FILE *fp));
107 static u_entry_T *unserialize_uep __ARGS((FILE *fp, int *error, char_u *file_name)); 106 static u_entry_T *unserialize_uep __ARGS((FILE *fp, int *error, char_u *file_name));
108 static void serialize_pos __ARGS((pos_T pos, FILE *fp)); 107 static void serialize_pos __ARGS((pos_T pos, FILE *fp));
696 * When "reading" is TRUE find the file to read, go over all directories in 695 * When "reading" is TRUE find the file to read, go over all directories in
697 * 'undodir'. 696 * 'undodir'.
698 * When "reading" is FALSE use the first name where the directory exists. 697 * When "reading" is FALSE use the first name where the directory exists.
699 * Returns NULL when there is no place to write or no file to read. 698 * Returns NULL when there is no place to write or no file to read.
700 */ 699 */
701 static char_u * 700 char_u *
702 u_get_undo_file_name(buf_ffname, reading) 701 u_get_undo_file_name(buf_ffname, reading)
703 char_u *buf_ffname; 702 char_u *buf_ffname;
704 int reading; 703 int reading;
705 { 704 {
706 char_u *dirp; 705 char_u *dirp;