Mirror of the Vim source from https://github.com/vim/vim
Revision | f0cfff4dcc2f7cad78ce86aae0f4cbd3371ce46d (tree) |
---|---|
Time | 2008-03-17 00:04:34 |
Author | vimboss |
Commiter | vimboss |
updated for version 7.1-283
@@ -3009,7 +3009,7 @@ | ||
3009 | 3009 | break; |
3010 | 3010 | if (!isalpha(p[j]) && j >= cmdmods[i].minlen |
3011 | 3011 | && (p == cmd || cmdmods[i].has_count)) |
3012 | - return j + (p - cmd); | |
3012 | + return j + (int)(p - cmd); | |
3013 | 3013 | } |
3014 | 3014 | return 0; |
3015 | 3015 | } |
@@ -1263,7 +1263,7 @@ | ||
1263 | 1263 | * The value of the --windowid argument. |
1264 | 1264 | * For embedding gvim inside another application. |
1265 | 1265 | */ |
1266 | -EXTERN int win_socket_id INIT(= 0); | |
1266 | +EXTERN long_u win_socket_id INIT(= 0); | |
1267 | 1267 | #endif |
1268 | 1268 | |
1269 | 1269 | #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL) |
@@ -1400,7 +1400,7 @@ | ||
1400 | 1400 | return NULL; |
1401 | 1401 | |
1402 | 1402 | /* Store length of eap->arg before it gets modified by strtok(). */ |
1403 | - eap_arg_len = STRLEN(eap->arg); | |
1403 | + eap_arg_len = (int)STRLEN(eap->arg); | |
1404 | 1404 | |
1405 | 1405 | if ((stok = strtok((char *)(eap->arg), (const char *)" ")) == NULL) |
1406 | 1406 | return NULL; |
@@ -1552,15 +1552,15 @@ | ||
1552 | 1552 | else if (STRICMP(argv[i], "--socketid") == 0) |
1553 | 1553 | # endif |
1554 | 1554 | { |
1555 | - unsigned int id; | |
1556 | - int count; | |
1555 | + long_u id; | |
1556 | + int count; | |
1557 | 1557 | |
1558 | 1558 | if (i == argc - 1) |
1559 | 1559 | mainerr_arg_missing((char_u *)argv[i]); |
1560 | 1560 | if (STRNICMP(argv[i+1], "0x", 2) == 0) |
1561 | - count = sscanf(&(argv[i + 1][2]), "%x", &id); | |
1561 | + count = sscanf(&(argv[i + 1][2]), SCANF_HEX_LONG_U, &id); | |
1562 | 1562 | else |
1563 | - count = sscanf(argv[i+1], "%u", &id); | |
1563 | + count = sscanf(argv[i + 1], SCANF_DECIMAL_LONG_U, &id); | |
1564 | 1564 | if (count != 1) |
1565 | 1565 | mainerr(ME_INVALID_ARG, (char_u *)argv[i]); |
1566 | 1566 | else |
@@ -522,7 +522,7 @@ | ||
522 | 522 | int len; |
523 | 523 | |
524 | 524 | expand_env((char_u *)"~/", NameBuff, MAXPATHL); |
525 | - len = STRLEN(NameBuff); | |
525 | + len = (int)STRLEN(NameBuff); | |
526 | 526 | vim_strncpy(NameBuff + len, fm->fname + 2, MAXPATHL - len - 1); |
527 | 527 | } |
528 | 528 | else |
@@ -1216,7 +1216,7 @@ | ||
1216 | 1216 | int lastbyte = last; |
1217 | 1217 | |
1218 | 1218 | oldtext = ml_get(lnum); |
1219 | - oldlen = STRLEN(oldtext); | |
1219 | + oldlen = (int)STRLEN(oldtext); | |
1220 | 1220 | if (first >= (colnr_T)oldlen || oldlen == 0) /* just in case */ |
1221 | 1221 | return; |
1222 | 1222 | if (lastbyte >= oldlen) |
@@ -1241,8 +1241,8 @@ | ||
1241 | 1241 | int len_first, len_other; |
1242 | 1242 | char_u *p; |
1243 | 1243 | |
1244 | - len_first = STRLEN(ml_get(first)); | |
1245 | - len_other = STRLEN(ml_get(other)); | |
1244 | + len_first = (int)STRLEN(ml_get(first)); | |
1245 | + len_other = (int)STRLEN(ml_get(other)); | |
1246 | 1246 | p = alloc((unsigned)(len_first + len_other + 1)); |
1247 | 1247 | if (p != NULL) |
1248 | 1248 | { |
@@ -337,7 +337,7 @@ | ||
337 | 337 | |
338 | 338 | if (rt != NULL) |
339 | 339 | { |
340 | - len = STRLEN(rt); | |
340 | + len = (int)STRLEN(rt); | |
341 | 341 | if (len > pum_width) |
342 | 342 | { |
343 | 343 | for (j = pum_width; j < len; ++j) |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 283, | |
671 | +/**/ | |
670 | 672 | 282, |
671 | 673 | /**/ |
672 | 674 | 281, |
@@ -355,16 +355,19 @@ | ||
355 | 355 | * On Win64 longs are 32 bit and pointers 64 bit. |
356 | 356 | * For printf() and scanf() we need to take care of long_u specifically. */ |
357 | 357 | #ifdef _WIN64 |
358 | -typedef unsigned __int64 long_u; | |
359 | -typedef __int64 long_i; | |
360 | -# define SCANF_HEX_LONG_U "%Ix" | |
361 | -# define PRINTF_HEX_LONG_U "0x%Ix" | |
358 | +typedef unsigned __int64 long_u; | |
359 | +typedef __int64 long_i; | |
360 | +# define SCANF_HEX_LONG_U "%Ix" | |
361 | +# define SCANF_DECIMAL_LONG_U "%Iu" | |
362 | +# define PRINTF_HEX_LONG_U "0x%Ix" | |
362 | 363 | #else |
363 | -typedef unsigned long long_u; | |
364 | -typedef long long_i; | |
365 | -# define SCANF_HEX_LONG_U "%lx" | |
366 | -# define PRINTF_HEX_LONG_U "0x%lx" | |
364 | +typedef unsigned long long_u; | |
365 | +typedef long long_i; | |
366 | +# define SCANF_HEX_LONG_U "%lx" | |
367 | +# define SCANF_DECIMAL_LONG_U "%lu" | |
368 | +# define PRINTF_HEX_LONG_U "0x%lx" | |
367 | 369 | #endif |
370 | +#define PRINTF_DECIMAL_LONG_U SCANF_DECIMAL_LONG_U | |
368 | 371 | |
369 | 372 | /* |
370 | 373 | * The characters and attributes cached for the screen. |
@@ -6303,7 +6303,7 @@ | ||
6303 | 6303 | cur = cur->next; |
6304 | 6304 | } |
6305 | 6305 | } |
6306 | - if ((hlg_id = syn_namen2id(grp, STRLEN(grp))) == 0) | |
6306 | + if ((hlg_id = syn_namen2id(grp, (int)STRLEN(grp))) == 0) | |
6307 | 6307 | { |
6308 | 6308 | EMSG2(_(e_nogroup), grp); |
6309 | 6309 | return -1; |