summaryrefslogtreecommitdiff
path: root/src/os_win32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-08-27 15:10:04 +0200
committerBram Moolenaar <Bram@vim.org>2011-08-27 15:10:04 +0200
commit2eba18255ea36927ea0acc6d45b7be03ca94a139 (patch)
tree1cfb84fc1e9839ffb6ea9385308207ed36cf3bb6 /src/os_win32.c
parentc9927c136f3e8933fc1ea4b043e0a0b8c12bd023 (diff)
downloadvim-2eba18255ea36927ea0acc6d45b7be03ca94a139.zip
updated for version 7.3.287
Problem: Can't compile with MSVC and tiny options. Solution: Move variables and #ifdefs. (Sergey Khorev)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 0d8bbf7d3..fbf077f6f 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -3419,8 +3419,6 @@ dump_pipe(int options,
{
DWORD availableBytes = 0;
DWORD i;
- int c;
- char_u *p;
int ret;
DWORD len;
DWORD toRead;
@@ -3479,6 +3477,8 @@ dump_pipe(int options,
else if (has_mbyte)
{
int l;
+ int c;
+ char_u *p;
len += *buffer_off;
buffer[len] = NUL;
@@ -3558,9 +3558,7 @@ mch_system_piped(char *cmd, int options)
int noread_cnt = 0;
garray_T ga;
int delay = 1;
-# ifdef FEAT_MBYTE
DWORD buffer_off = 0; /* valid bytes in buffer[] */
-# endif
SECURITY_ATTRIBUTES saAttr;
@@ -3777,14 +3775,12 @@ mch_system_piped(char *cmd, int options)
if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT)
{
- dump_pipe(options, g_hChildStd_OUT_Rd,
- &ga, buffer, &buffer_off);
+ dump_pipe(options, g_hChildStd_OUT_Rd, &ga, buffer, &buffer_off);
break;
}
++noread_cnt;
- dump_pipe(options, g_hChildStd_OUT_Rd,
- &ga, buffer, &buffer_off);
+ dump_pipe(options, g_hChildStd_OUT_Rd, &ga, buffer, &buffer_off);
/* We start waiting for a very short time and then increase it, so
* that we respond quickly when the process is quick, and don't