Mercurial > vim
comparison src/undo.c @ 2271:2b33a7678e7b vim73
Fix compiler warnings for shadowed variables. Make 'conceal' a long instead
of int.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 22 Jun 2010 06:28:58 +0200 |
parents | c08f91142c41 |
children | 941ff1cd317a |
comparison
equal
deleted
inserted
replaced
2270:917fff7bc09d | 2271:2b33a7678e7b |
---|---|
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 void corruption_error __ARGS((char *msg, char_u *file_name)); | 103 static void corruption_error __ARGS((char *mesg, char_u *file_name)); |
104 static void u_free_uhp __ARGS((u_header_T *uhp)); | 104 static void u_free_uhp __ARGS((u_header_T *uhp)); |
105 static size_t fwrite_crypt __ARGS((buf_T *buf UNUSED, char_u *ptr, size_t len, FILE *fp)); | 105 static size_t fwrite_crypt __ARGS((buf_T *buf UNUSED, char_u *ptr, size_t len, FILE *fp)); |
106 static char_u *read_string_decrypt __ARGS((buf_T *buf UNUSED, FILE *fd, int len)); | 106 static char_u *read_string_decrypt __ARGS((buf_T *buf UNUSED, FILE *fd, int len)); |
107 static int serialize_header __ARGS((FILE *fp, buf_T *buf, char_u *hash)); | 107 static int serialize_header __ARGS((FILE *fp, buf_T *buf, char_u *hash)); |
108 static int serialize_uhp __ARGS((FILE *fp, buf_T *buf, u_header_T *uhp)); | 108 static int serialize_uhp __ARGS((FILE *fp, buf_T *buf, u_header_T *uhp)); |
777 vim_free(munged_name); | 777 vim_free(munged_name); |
778 return undo_file_name; | 778 return undo_file_name; |
779 } | 779 } |
780 | 780 |
781 static void | 781 static void |
782 corruption_error(msg, file_name) | 782 corruption_error(mesg, file_name) |
783 char *msg; | 783 char *mesg; |
784 char_u *file_name; | 784 char_u *file_name; |
785 { | 785 { |
786 EMSG3(_("E825: Corrupted undo file (%s): %s"), msg, file_name); | 786 EMSG3(_("E825: Corrupted undo file (%s): %s"), mesg, file_name); |
787 } | 787 } |
788 | 788 |
789 static void | 789 static void |
790 u_free_uhp(uhp) | 790 u_free_uhp(uhp) |
791 u_header_T *uhp; | 791 u_header_T *uhp; |
1311 } | 1311 } |
1312 goto theend; | 1312 goto theend; |
1313 } | 1313 } |
1314 else | 1314 else |
1315 { | 1315 { |
1316 char_u buf[UF_START_MAGIC_LEN]; | 1316 char_u mbuf[UF_START_MAGIC_LEN]; |
1317 int len; | 1317 int len; |
1318 | 1318 |
1319 len = vim_read(fd, buf, UF_START_MAGIC_LEN); | 1319 len = vim_read(fd, mbuf, UF_START_MAGIC_LEN); |
1320 close(fd); | 1320 close(fd); |
1321 if (len < UF_START_MAGIC_LEN | 1321 if (len < UF_START_MAGIC_LEN |
1322 || memcmp(buf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) | 1322 || memcmp(mbuf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0) |
1323 { | 1323 { |
1324 if (name != NULL || p_verbose > 0) | 1324 if (name != NULL || p_verbose > 0) |
1325 { | 1325 { |
1326 if (name == NULL) | 1326 if (name == NULL) |
1327 verbose_enter(); | 1327 verbose_enter(); |