Mercurial > vim
comparison src/os_win32.c @ 3030:07bc2ccfe555 v7.3.287
updated for version 7.3.287
Problem: Can't compile with MSVC and tiny options.
Solution: Move variables and #ifdefs. (Sergey Khorev)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 27 Aug 2011 15:10:04 +0200 |
parents | e5b17a5f6516 |
children | 397e7e49bb0b |
comparison
equal
deleted
inserted
replaced
3029:6ca6a42b3cc7 | 3030:07bc2ccfe555 |
---|---|
3417 char_u buffer[], | 3417 char_u buffer[], |
3418 DWORD *buffer_off) | 3418 DWORD *buffer_off) |
3419 { | 3419 { |
3420 DWORD availableBytes = 0; | 3420 DWORD availableBytes = 0; |
3421 DWORD i; | 3421 DWORD i; |
3422 int c; | |
3423 char_u *p; | |
3424 int ret; | 3422 int ret; |
3425 DWORD len; | 3423 DWORD len; |
3426 DWORD toRead; | 3424 DWORD toRead; |
3427 int repeatCount; | 3425 int repeatCount; |
3428 | 3426 |
3477 } | 3475 } |
3478 # ifdef FEAT_MBYTE | 3476 # ifdef FEAT_MBYTE |
3479 else if (has_mbyte) | 3477 else if (has_mbyte) |
3480 { | 3478 { |
3481 int l; | 3479 int l; |
3480 int c; | |
3481 char_u *p; | |
3482 | 3482 |
3483 len += *buffer_off; | 3483 len += *buffer_off; |
3484 buffer[len] = NUL; | 3484 buffer[len] = NUL; |
3485 | 3485 |
3486 /* Check if the last character in buffer[] is | 3486 /* Check if the last character in buffer[] is |
3556 DWORD i; | 3556 DWORD i; |
3557 int c; | 3557 int c; |
3558 int noread_cnt = 0; | 3558 int noread_cnt = 0; |
3559 garray_T ga; | 3559 garray_T ga; |
3560 int delay = 1; | 3560 int delay = 1; |
3561 # ifdef FEAT_MBYTE | |
3562 DWORD buffer_off = 0; /* valid bytes in buffer[] */ | 3561 DWORD buffer_off = 0; /* valid bytes in buffer[] */ |
3563 # endif | |
3564 | 3562 |
3565 SECURITY_ATTRIBUTES saAttr; | 3563 SECURITY_ATTRIBUTES saAttr; |
3566 | 3564 |
3567 /* Set the bInheritHandle flag so pipe handles are inherited. */ | 3565 /* Set the bInheritHandle flag so pipe handles are inherited. */ |
3568 saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); | 3566 saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); |
3775 if (ta_len) | 3773 if (ta_len) |
3776 ui_inchar_undo(ta_buf, ta_len); | 3774 ui_inchar_undo(ta_buf, ta_len); |
3777 | 3775 |
3778 if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) | 3776 if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) |
3779 { | 3777 { |
3780 dump_pipe(options, g_hChildStd_OUT_Rd, | 3778 dump_pipe(options, g_hChildStd_OUT_Rd, &ga, buffer, &buffer_off); |
3781 &ga, buffer, &buffer_off); | |
3782 break; | 3779 break; |
3783 } | 3780 } |
3784 | 3781 |
3785 ++noread_cnt; | 3782 ++noread_cnt; |
3786 dump_pipe(options, g_hChildStd_OUT_Rd, | 3783 dump_pipe(options, g_hChildStd_OUT_Rd, &ga, buffer, &buffer_off); |
3787 &ga, buffer, &buffer_off); | |
3788 | 3784 |
3789 /* We start waiting for a very short time and then increase it, so | 3785 /* We start waiting for a very short time and then increase it, so |
3790 * that we respond quickly when the process is quick, and don't | 3786 * that we respond quickly when the process is quick, and don't |
3791 * consume too much overhead when it's slow. */ | 3787 * consume too much overhead when it's slow. */ |
3792 if (delay < 50) | 3788 if (delay < 50) |