comparison src/fileio.c @ 2217:120502692d82 vim73

Improve the MS-Windows installer.
author Bram Moolenaar <bram@vim.org>
date Mon, 24 May 2010 21:34:22 +0200
parents cccb71c2c5c1
children 3d0a7beb0d75
comparison
equal deleted inserted replaced
2216:ef150ab31dda 2217:120502692d82
2846 continue; 2846 continue;
2847 if (memcmp(ptr, crypt_magic[i], CRYPT_MAGIC_LEN) == 0) 2847 if (memcmp(ptr, crypt_magic[i], CRYPT_MAGIC_LEN) == 0)
2848 return i; 2848 return i;
2849 } 2849 }
2850 2850
2851 i = STRLEN(crypt_magic_head); 2851 i = (int)STRLEN(crypt_magic_head);
2852 if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0) 2852 if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
2853 EMSG(_("E821: File is encrypted with unknown method")); 2853 EMSG(_("E821: File is encrypted with unknown method"));
2854 2854
2855 return -1; 2855 return -1;
2856 } 2856 }
4407 * Keep it fast! 4407 * Keep it fast!
4408 */ 4408 */
4409 ptr = ml_get_buf(buf, lnum, FALSE) - 1; 4409 ptr = ml_get_buf(buf, lnum, FALSE) - 1;
4410 #ifdef FEAT_PERSISTENT_UNDO 4410 #ifdef FEAT_PERSISTENT_UNDO
4411 if (write_undo_file) 4411 if (write_undo_file)
4412 sha256_update(&sha_ctx, ptr + 1, STRLEN(ptr + 1) + 1); 4412 sha256_update(&sha_ctx, ptr + 1, (UINT32_T)(STRLEN(ptr + 1) + 1));
4413 #endif 4413 #endif
4414 while ((c = *++ptr) != NUL) 4414 while ((c = *++ptr) != NUL)
4415 { 4415 {
4416 if (c == NL) 4416 if (c == NL)
4417 *s = NUL; /* replace newlines with NULs */ 4417 *s = NUL; /* replace newlines with NULs */
5673 int same_encoding; 5673 int same_encoding;
5674 int enc_flags; 5674 int enc_flags;
5675 int fenc_flags; 5675 int fenc_flags;
5676 5676
5677 if (*fenc == NUL || STRCMP(p_enc, fenc) == 0) 5677 if (*fenc == NUL || STRCMP(p_enc, fenc) == 0)
5678 {
5678 same_encoding = TRUE; 5679 same_encoding = TRUE;
5680 fenc_flags = 0;
5681 }
5679 else 5682 else
5680 { 5683 {
5681 /* Ignore difference between "ansi" and "latin1", "ucs-4" and 5684 /* Ignore difference between "ansi" and "latin1", "ucs-4" and
5682 * "ucs-4be", etc. */ 5685 * "ucs-4be", etc. */
5683 enc_flags = get_fio_flags(p_enc); 5686 enc_flags = get_fio_flags(p_enc);