Mercurial > vim
comparison src/undo.c @ 6132:0242c27e40e1 v7.4.404
updated for version 7.4.404
Problem: Windows 64 bit compiler warnings.
Solution: Add type casts. (Mike Williams)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 13 Aug 2014 22:05:53 +0200 |
parents | 3aa37ad2c4ed |
children | f1ba154c3a12 |
comparison
equal
deleted
inserted
replaced
6131:b201f6f99781 | 6132:0242c27e40e1 |
---|---|
990 char_u buf[8]; | 990 char_u buf[8]; |
991 int i; | 991 int i; |
992 int bufi = 0; | 992 int bufi = 0; |
993 | 993 |
994 for (i = len - 1; i >= 0; --i) | 994 for (i = len - 1; i >= 0; --i) |
995 buf[bufi++] = nr >> (i * 8); | 995 buf[bufi++] = (char_u)(nr >> (i * 8)); |
996 return undo_write(bi, buf, (size_t)len); | 996 return undo_write(bi, buf, (size_t)len); |
997 } | 997 } |
998 | 998 |
999 /* | 999 /* |
1000 * Write the pointer to an undo header. Instead of writing the pointer itself | 1000 * Write the pointer to an undo header. Instead of writing the pointer itself |
1091 size_t size; | 1091 size_t size; |
1092 { | 1092 { |
1093 #ifdef FEAT_CRYPT | 1093 #ifdef FEAT_CRYPT |
1094 if (bi->bi_buffer != NULL) | 1094 if (bi->bi_buffer != NULL) |
1095 { | 1095 { |
1096 int size_todo = size; | 1096 int size_todo = (int)size; |
1097 char_u *p = buffer; | 1097 char_u *p = buffer; |
1098 | 1098 |
1099 while (size_todo > 0) | 1099 while (size_todo > 0) |
1100 { | 1100 { |
1101 size_t n; | 1101 size_t n; |
1117 n = size_todo; | 1117 n = size_todo; |
1118 if (n > bi->bi_avail - bi->bi_used) | 1118 if (n > bi->bi_avail - bi->bi_used) |
1119 n = bi->bi_avail - bi->bi_used; | 1119 n = bi->bi_avail - bi->bi_used; |
1120 mch_memmove(p, bi->bi_buffer + bi->bi_used, n); | 1120 mch_memmove(p, bi->bi_buffer + bi->bi_used, n); |
1121 bi->bi_used += n; | 1121 bi->bi_used += n; |
1122 size_todo -= n; | 1122 size_todo -= (int)n; |
1123 p += n; | 1123 p += n; |
1124 } | 1124 } |
1125 return OK; | 1125 return OK; |
1126 } | 1126 } |
1127 #endif | 1127 #endif |