Subversion Repositories DevTools

Rev

Rev 267 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 267 Rev 4814
Line 36... Line 36...
36
**   Target         : WIN32 ONLY
36
**   Target         : WIN32 ONLY
37
**
37
**
38
**
38
**
39
**==========================================================================*/
39
**==========================================================================*/
40
 
40
 
-
 
41
#define _CRT_SECURE_NO_WARNINGS 1       // Supress warnings about use of strcpy()
41
 
42
 
42
#include <stdio.h>
43
#include <stdio.h>
43
#include <windows.h> 
44
#include <windows.h> 
44
 
45
 
45
#define BUFSIZE     4096
46
#define BUFSIZE     4096
Line 151... Line 152...
151
    /*
152
    /*
152
    **  Process the remainder of the command line and create a string
153
    **  Process the remainder of the command line and create a string
153
    **  For the command line. Some of the arguments will need to be quoted
154
    **  For the command line. Some of the arguments will need to be quoted
154
    */
155
    */
155
    {
156
    {
156
        int length = 0;
157
        size_t length = 0;
157
        int start;
158
        int start;
158
        char join = 0;
159
        char join = 0;
159
 
160
 
160
        /*
161
        /*
161
        **  Calc required size of the command line
162
        **  Calc required size of the command line
Line 588... Line 589...
588
    if ( p->ptr != p->buf )
589
    if ( p->ptr != p->buf )
589
    {
590
    {
590
        *p->ptr++ = '\n';
591
        *p->ptr++ = '\n';
591
 
592
 
592
        EnterCriticalSection(&CriticalSection);
593
        EnterCriticalSection(&CriticalSection);
593
        WriteFile(hSaveStdout, p->name, p->name_len, &dwWritten, NULL);
594
        WriteFile(hSaveStdout, p->name,(DWORD) p->name_len     , &dwWritten, NULL);
594
        WriteFile(hSaveStdout, p->buf, p->ptr - p->buf, &dwWritten, NULL);
595
        WriteFile(hSaveStdout, p->buf, (DWORD)(p->ptr - p->buf), &dwWritten, NULL);
595
        LeaveCriticalSection(&CriticalSection);
596
        LeaveCriticalSection(&CriticalSection);
596
 
597
 
597
        p->ptr = p->buf;
598
        p->ptr = p->buf;
598
    }
599
    }
599
}
600
}