Mercurial > vim
comparison src/if_cscope.c @ 10264:c036c0f636d5 v8.0.0029
commit https://github.com/vim/vim/commit/cea912af725c54f4727a0565e31661f6b29c6bb1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 12 14:20:24 2016 +0200
patch 8.0.0029
Problem: Code for MS-Windows is complicated because of the exceptions for
old systems.
Solution: Drop support for MS-Windows older than Windows XP. (Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 12 Oct 2016 14:30:05 +0200 |
parents | 4aead6a9b7a9 |
children | d52d97bf675e |
comparison
equal
deleted
inserted
replaced
10263:b758a787983a | 10264:c036c0f636d5 |
---|---|
837 STARTUPINFO si; | 837 STARTUPINFO si; |
838 BOOL pipe_stdin = FALSE, pipe_stdout = FALSE; | 838 BOOL pipe_stdin = FALSE, pipe_stdout = FALSE; |
839 HANDLE stdin_rd, stdout_rd; | 839 HANDLE stdin_rd, stdout_rd; |
840 HANDLE stdout_wr, stdin_wr; | 840 HANDLE stdout_wr, stdin_wr; |
841 BOOL created; | 841 BOOL created; |
842 # ifdef __BORLANDC__ | 842 # if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__) |
843 # define OPEN_OH_ARGTYPE intptr_t | |
844 # else | |
843 # define OPEN_OH_ARGTYPE long | 845 # define OPEN_OH_ARGTYPE long |
844 # else | |
845 # if (_MSC_VER >= 1300) || defined(__MINGW32__) | |
846 # define OPEN_OH_ARGTYPE intptr_t | |
847 # else | |
848 # define OPEN_OH_ARGTYPE long | |
849 # endif | |
850 # endif | 846 # endif |
851 #endif | 847 #endif |
852 | 848 |
853 #if defined(UNIX) | 849 #if defined(UNIX) |
854 /* | 850 /* |
1425 { | 1421 { |
1426 short i, j; | 1422 short i, j; |
1427 #ifndef UNIX | 1423 #ifndef UNIX |
1428 BY_HANDLE_FILE_INFORMATION bhfi; | 1424 BY_HANDLE_FILE_INFORMATION bhfi; |
1429 | 1425 |
1430 /* On windows 9x GetFileInformationByHandle doesn't work, so skip it */ | 1426 switch (win32_fileinfo((char_u *)fname, &bhfi)) |
1431 if (!mch_windows95()) | 1427 { |
1432 { | |
1433 switch (win32_fileinfo((char_u *)fname, &bhfi)) | |
1434 { | |
1435 case FILEINFO_ENC_FAIL: /* enc_to_utf16() failed */ | 1428 case FILEINFO_ENC_FAIL: /* enc_to_utf16() failed */ |
1436 case FILEINFO_READ_FAIL: /* CreateFile() failed */ | 1429 case FILEINFO_READ_FAIL: /* CreateFile() failed */ |
1437 if (p_csverbose) | 1430 if (p_csverbose) |
1438 { | 1431 { |
1439 char *cant_msg = _("E625: cannot open cscope database: %s"); | 1432 char *cant_msg = _("E625: cannot open cscope database: %s"); |
1452 | 1445 |
1453 case FILEINFO_INFO_FAIL: /* GetFileInformationByHandle() failed */ | 1446 case FILEINFO_INFO_FAIL: /* GetFileInformationByHandle() failed */ |
1454 if (p_csverbose) | 1447 if (p_csverbose) |
1455 (void)EMSG(_("E626: cannot get cscope database information")); | 1448 (void)EMSG(_("E626: cannot get cscope database information")); |
1456 return -1; | 1449 return -1; |
1457 } | |
1458 } | 1450 } |
1459 #endif | 1451 #endif |
1460 | 1452 |
1461 i = -1; /* can be set to the index of an empty item in csinfo */ | 1453 i = -1; /* can be set to the index of an empty item in csinfo */ |
1462 for (j = 0; j < csinfo_size; j++) | 1454 for (j = 0; j < csinfo_size; j++) |
1466 && csinfo[j].st_dev == sb->st_dev && csinfo[j].st_ino == sb->st_ino | 1458 && csinfo[j].st_dev == sb->st_dev && csinfo[j].st_ino == sb->st_ino |
1467 #else | 1459 #else |
1468 /* compare pathnames first */ | 1460 /* compare pathnames first */ |
1469 && ((fullpathcmp((char_u *)csinfo[j].fname, | 1461 && ((fullpathcmp((char_u *)csinfo[j].fname, |
1470 (char_u *)fname, FALSE) & FPC_SAME) | 1462 (char_u *)fname, FALSE) & FPC_SAME) |
1471 /* if not Windows 9x, test index file attributes too */ | 1463 /* test index file attributes too */ |
1472 || (!mch_windows95() | 1464 || (csinfo[j].nVolume == bhfi.dwVolumeSerialNumber |
1473 && csinfo[j].nVolume == bhfi.dwVolumeSerialNumber | |
1474 && csinfo[j].nIndexHigh == bhfi.nFileIndexHigh | 1465 && csinfo[j].nIndexHigh == bhfi.nFileIndexHigh |
1475 && csinfo[j].nIndexLow == bhfi.nFileIndexLow)) | 1466 && csinfo[j].nIndexLow == bhfi.nFileIndexLow)) |
1476 #endif | 1467 #endif |
1477 ) | 1468 ) |
1478 { | 1469 { |